views:

111

answers:

2

I installed Rails 3 by following this gist: http://gist.github.com/296055

But when I try "rails" in terminal I get the following error:

/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.0/lib/rails: Is a directory - /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.0/lib/rails (Errno::EISDIR)
    from /usr/bin/rails:19:in `load'
    from /usr/bin/rails:19

Any ideas?

UPDATE

Ok, I figured out something. I can run the correct rails by going directly to the right executable: /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/rails-3.0.0/bin/rails

Apparantly my "rails" command is still linked another version, the one in usr/local/bin

How can I change this?

A: 

I followed this article and was able to install everything. The article is in Russian, but you should be able to translate it to desired language via Google translate. I bumped into 'no ssl' error but this article explains how to resolve it as well (at the bottom).

My setup now is:

  1. RVM
  2. Ruby 1.8.7 + Rails 2.3.8
  3. Ruby 1.9.2 + Rails 3.0.0

Hope this will help you.

Valentin Vasiliev
I read the post, but there is nothing in there that I did different or says about my error..
A: 

Check out my answer on this other question:

(if this works for you, we should mark this as a duplicate question. But I don't have enough points to do that myself)

--

Older versions of rvm had a bug that can cause your ruby versions to get crosswired because the OS can cache executable paths for the which command (particularly if you are using zsh). See this long, detailed, mind blowing post by Yehuda Katz on the subject.

What I had to do this morning:

rvm update && rvm reload # update rvm
rvm gemset delete rails3 # delete old gemset
rvm install 1.9.2
rvm use 1.9.2
rvm gemset create rails3
rvm use 1.9.2@rails3
which ruby          # check to be sure the ruby interpretter is properly set to 1.9.2
hash -r             # if ruby interpretter is not pointing to 1.9.2
gem install rails
which rails         # check to be sure we are using rvm version of rails
marshally