I am trying to use the rails gem Kaleidoscope and I'm having some trouble getting it installed. For reference here is the github site: https://github.com/JoshSmith/kaleidoscope
I include it in the Gemfile and it bundles just fine. But it does not install the config/initializers/kaleidoscope.rb.
I then tried to gem install directly, but it keeps telling me that
$ rails generate kaleidoscope:install
Could not find generator kaleidoscope:install
Does anyone have any ideas to help get it working?
Change your gemfile entry for the kaleidoscope gem to this:
gem 'kaleidoscope', :git => "https://github.com/JoshSmith/kaleidoscope"
The run
$ bundle update
This solved the issue on a Rails 4 app just now for me.
Related
I am a beginner at Rails and when I typed in 'rails server' in Terminal, I received this error:
Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
I am using OSX Yosemite 10.10.5. I've tried installing it:
gem install mysql2
It still gave me the same error. I see that mysql2-0.4.0 is installed. Please help, thank you!
There is a bug in Rails 4.2.4 and previous, with the newly released 0.4.0 version of the mysql2 gem -- one part of Rails will accidentally refuse to use the newly released 0.4.0 version of mysql2.
The issue is reported here, although without a lot of details:
https://github.com/rails/rails/issues/21544
Until a new version of Rails is released that fixes this one way or another, add this to your Gemfile, specifying that mysql2 0.4.0 won't work:
# mysql 0.4.0 does not work with Rails 4.2.4
# https://github.com/rails/rails/issues/21544
gem 'mysql2', '>= 0.3.13', '< 0.4.0'
You previously probably just have gem 'mysql2' in your Gemfile -- add the version constraints as above, so it knows 0.4.0 won't work. Add the comments so you know why you did it, and can remove it later when no longer neccesary (probably whenever Rails 4.2.5 comes out).
Edit the Gemfile in your app like above, and then run bundle update mysql2 in your app directory, so your app will be using a mysql2 gem version 0.3.x again, as current Rails version wants.
When Rails 4.2.5 or later comes out and you upgrade to it, you will probably want to go back to your Gemfile and remove the version requirement specification for mysql2, return it to saying just gem 'mysql2' again. So your app will be willing to use the newer mysql2 0.4.0 gem, once Rails is willing to do so too.
add gem 'mysql2' to your Gemfile to specify the gems you want to use in your project
run bundle install which will install all gems, specified by Gemfile
run rails s should work fine
I installed Ruby 2.2.2 x64 and gem version 2.4.6. on Windows 7 64
I've run gem update --system
I get the above error when doing gem install rails --no-ri --no-rdoc
I've researched Google, but found no relevant answer. Any ideas?
RailsInstaller is the best package for installing rails on windows.It includes all required Packages. RilasInstaller - http://railsinstaller.org/en
I am using rails 4.1.1
When I execute the command rails g generator my_generator
The generator runs but always ends with error rspec [not found]
I have added the rspec and rspec-rails gems to my Gemfile.
What step am I missing to get this working?
You do not need to add rspec to your gem files, just rspec-rails.
After you bundle install run rails generate rspec:install and everything should work fine.
The recommended way to install RSpec by the the rspec-rails repository is:
Add rspec-rails to both the :development and :test groups in the Gemfile:
group :development, :test do
gem 'rspec-rails', '~> 3.0'
end
After that run bundle install and your RSpec should run fine.
I am guessing that this answer has been already answered somewhere but I was not able to find it. I am having troubles with installing Rails 4. I have put in the Gemfile:
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
And I have run bundle install --path vendor/bundle and all the gems are installed, but when I run bundle exec rails s then I receive an error:
bundler: command not found: rails
Install missing gem executables with `bundle install`
which rails doesn't returning anything. I am using ruby 2.0.0 and rvm and it seems everything has been set up.
What am I missing and how to set-up Rails 4?
What solved my problem for Rails 4, in this case, was running a command in the root directory of the application:
bundle exec rake rails:update:bin
After that , running a bundle exec rails s reported no errors and was working as expected.
In Gemfile please add
ruby 2.0.0
or
Try to use .ruby-version and .ruby-gemset.
Please read this
In a Rails 4 app, I am trying to use ActiveAdmin 1.0.pre2. bundle install doesn't complain and seems to have included the gem and it works properly.
I am having this in my gem file:
gem 'activeadmin', github: 'gregbell/active_admin'
$> bundle show activeadmin
/home/aslam/.rvm/gems/ruby-2.1.0#monaeo/bundler/gems/active_admin-3fb7f03335b1
Even after running bundle install several times, I keep getting the following error:
git://github.com/gregbell/active_admin.git (at master) is not yet checked out.
Run `bundle install` first.
I am using
Bundler version 1.6.0.rc2 (upgraded from 1.5.3)
Ruby: ruby 2.1.0p0 (2013-12-25 revision 44422) [i686-linux]
Rails: 4.0.4
I am not sure what is going wrong here?
Try to install a prerelease version of Bundler:
gem install bundler --pre
It should solve the problem.
Use following in the Gemfile
gem 'activeadmin', :git => "git://github.com/gregbell/active_admin.git"
This way when you run bundle install, activeadmin would be sourced from its github repository.
Two things
A. You need to include like this in the gem file since 0.6.x is stable and maintained.
gem 'activeadmin', github: 'gregbell/active_admin', branch: '0-6-stable'
B. You can give a try by forking from the stable version of activeadmin
My solution:
rake rails:update:bin
bundle install