Paladini
Paladini

Reputation: 4572

Gemfile specify ruby-1.9.3, bundle install asks for ruby-2.0.0

I'm developing two different projects: one using ruby-1.9.3 and another using ruby-2.0.0 (the version of Rails changes too). I was developing the 2º project and now I'm coming back to the 1º (ruby 1.9.3), but I'm having some troubles.

Before start explain my problem, this is the result when I run rvm list:

rvm rubies

=> ruby-1.9.3-p484 [ i686 ]
 * ruby-2.0.0-p353 [ i686 ]

# => - current
# =* - current && default
#  * - default

If I run ruby -v I got:

ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]

And you can find in my gemfile of the first project:

ruby '1.9.3'
gem 'rails', '3.2.3'

My problem is: I can't run the server and download/install the gems. When I try to run rails s in my first project I get:

Could not find rake-10.1.0 in any of the sources
Run `bundle install` to install missing gems.

And when I try to run sudo bundle install I get:

Your Ruby version is 2.0.0, but your Gemfile specified 1.9.3

But you saw above that my gemfile specify 'ruby-1.9.3', not 'ruby-2.0.0'. What can I do to start work hard in my old project?

Upvotes: 0

Views: 1643

Answers (1)

Catfish
Catfish

Reputation: 19294

I'm guessing that there is some conflict between the native ruby installation and the RVM installation.

I recommend you try this:

$ cd /path/to/ruby-1.9.3/project1
$ rvm use 1.9.3
$ rvm gemset create project1
$ rvm gemset use project1
$ bundle install

Upvotes: 3

Related Questions