I am trying to start a new project in Rails, but I keep getting the following error:
/Library/Ruby/Site/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [] (Gem::LoadError)
from /Library/Ruby/Site/1.8/rubygems/dependency.rb:256:in `to_spec'
from /Library/Ruby/Site/1.8/rubygems.rb:1210:in `gem'
from /usr/bin/rails:18
What do I do to fix this???
Try this :
sudo gem install railties
Related
getting error on rails new myapp
/home/high-tech/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'railties' (>= 0) among 19 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/home/high-tech/.rvm/gems/ruby-2.2.3:/home/high-tech/.rvm/gems/ruby-2.2.3#global', execute `gem env` for more information
from /home/high-tech/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /home/high-tech/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /home/high-tech/.rbenv/versions/2.2.0/bin/rails:22:in `<main>'
Rails' dependencies might not be correctly installed.
Try the following:
bundle show railties
If it fails:
gem install railties
to install the gem.
Hope it helps.
When I type
rails _4.2.0.rc2_ new hello_app
I get this error
/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'railties' (= 4.2.0.rc2) - did find: [railties-4.1.8] (Gem::LoadError)
Checked in 'GEM_PATH=/Users/a11/.gem/ruby/2.0.0:/Library/Ruby/Gems/2.0.0:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0', execute `gem env` for more information
from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:324:in `to_spec'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /usr/bin/rails:22:in `<main>'
I tried installing railsties 4.2.0.rc2 using
gem install railties --pre
If you want try to use new rails version, you need execute
gem install rails --pre
instead of
gem install railties --pre
Railties its core of Rails framework but not in all. See official documentation for more information.
I re-installed rails completely
gem uninstall railties -v 4.2.0.rc2
sudo gem install rails -v 4.2.0.rc2
and that solved it.
I got a rack conflict error after installing ruby and rails on OSX.
sudo rails new test -T
/Library/Ruby/Site/1.8/rubygems/specification.rb:1990:in `raise_if_conflicts': Unable to activate actionpack-3.2.13, because rack-1.5.2 conflicts with rack (~> 1.4.5) (Gem::LoadError)
from /Library/Ruby/Site/1.8/rubygems/specification.rb:1163:in `activate'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:1199:in `activate_dependencies'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:1185:in `each'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:1185:in `activate_dependencies'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:1167:in `activate'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_gem.rb:48:in `gem'
from /usr/bin/rails:18
Please try this:
gem uninstall rack
Select gem to uninstall:
1. rack-1.4.5
2. rack-1.5.2
3. All versions
>2
Successfully uninstalled rack-1.5.2
$ rails
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': RubyGem version error: rack(1.4.0 not ~> 1.3.5) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:246:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:246:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
from /usr/bin/rails:18
Then I try this:
$ sudo gem install rack 1.3.5
Password:
Successfully installed rack-1.4.0
ERROR: could not find gem 1.3.5 locally or in a repository
1 gem installed
Installing ri documentation for rack-1.4.0...
Cannot read termcap database;
using dumb terminal settings.
Installing RDoc documentation for rack-1.4.0...
then again but different:
rails
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:230:in `activate': can't activate rack (~> 1.3.5, runtime) for ["actionpack-3.1.3", "rails-3.1.3"], already activated rack-1.4.0 for ["rack-cache-1.1", "actionpack-3.1.3", "rails-3.1.3"] (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:246:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:246:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
from /usr/bin/rails:18
You have to install rack 1.3.5 and remove rack 1.4.0
sudo gem install rack -v 1.3.5
sudo gem uninstall rack -v 1.4.0
The command to install a specific version is
sudo gem install rack --version=1.3.5
What you've written is trying to find a gem called 1.3.5
I'm believe its because of rack gem versions.
Give the command gem list rack
Its displays all the rack gems versions, after that I uninstalled all rack versions and run the bundle command hope you specified which version of rack you want in Gemfile.
I believe its because if you specify a rack version in Gemfile and if gems contrails a version greater than that, it my causes error.
So try to uninstall all the rack gems and run bundle command.
Hope it may help.
I want to use the last version of rails, in my Gemfile: gem 'rails', '3.0.0.beta3'
When trying to start my server I get this error, do you know how I can fix this issue?
$rails s
/Library/Ruby/Site/1.8/rubygems.rb:777:in `report_activate_error': RubyGem version error: activesupport(1.4.4 not = 3.0.0.beta) (Gem::LoadError)
from /Library/Ruby/Site/1.8/rubygems.rb:211:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:246:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:245:in `each'
from /Library/Ruby/Site/1.8/rubygems.rb:245:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:1056:in `gem'
from /usr/bin/rails:18
bundle install return Your bundle is complete!
gem list give me
activesupport (3.0.0.beta3, 2.3.5, 2.2.2, 1.4.4)
ok so you have activesupport 3.0.0.beta3 while it requires activesupport 3.0.0.beta. Try this:
gem install activesupport -v 3.0.0.beta --pre