0

I have rails and RVM installed on OSx 10.7.4

If I do this

$ cd ~/ $ rails -v 

I get

$ Rails 3.2.3 

Now if I go into a rails application with

$ cd ~/rails-project/ Using ~/.rvm/gems/ruby-1.9.2-p320 with gemset ourgemset 

The .vmrc file in the rails app looks like this

rvm use --create 1.9.2@ourgemset 

However when I try and use rails now I get

$ rails -v Rails is not currently installed on this system. To get the latest version, simply type: sudo gem install rails You can then rerun your "rails" command. 

My ~/.bash_profile has this line at the end of it (and these scripts exist)

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function 

I've no idea why this is happening or where to look to solve it.

EDIT:

On further investigation if I do the following

$ rvm use default Using ~/.rvm/gems/ruby-1.9.3-p194 with gemset anothergemset 

Now rails works fine. If I switch back to

$rvm use ruby-1.9.2-p320 

I can't use rails anymore. Help!

1 Answer 1

1

Your global env has Rails but your gemset does not contain the rails gem. So when you are in cd ~/rails-project/ run the command:

gem install rails 

it will install the gem to your rvm gemset.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.