Nishtha Nishtha - 4 months ago 12
Ruby Question

Getting error when creating new rails project

When I am trying to create a new rails project I am getting this error .I have never got this error .

/usr/share/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'activesupport' (= 4.2.5) - did find: [activesupport-4.2.4,activesupport-4.2.3,activesupport-4.2.1,activesupport-4.2.0,activesupport-4.1.5,activesupport-4.1.4,activesupport-4.1.1,activesupport-4.0.13,activesupport-4.0.4,activesupport-4.0.0,activesupport-3.2.16,activesupport-3.2.13,activesupport-3.2.11,activesupport-3.2.9,activesupport-3.2.2,activesupport-3.1.3,activesupport-3.0.3] (Gem::LoadError)
Checked in 'GEM_PATH=/home/techbirds/.rvm/gems/ruby-2.2.1:/home/techbirds/.rvm/gems/ruby-2.2.1@global', execute `gem env` for more information
from /usr/share/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1311:in `block in activate_dependencies'
from /usr/share/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in `each'
from /usr/share/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in `activate_dependencies'
from /usr/share/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1282:in `activate'
from /usr/share/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:67:in `block in gem'
from /usr/share/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in `synchronize'
from /usr/share/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in `gem'
from /home/techbirds/.rvm/gems/ruby-2.2.1/bin/rails:22:in `<main>'
from /home/techbirds/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
from /home/techbirds/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'

Answer

Seems like you are getting this error because updated version of ruby is not being used by rvm .
Run this command

rvm list
Which will give you all the ruby version installed on your system and which version of ruby is being used by your computer .Then select the latest version of ruby by this command

rvm use ruby version
Comments