having an annoying problem here. my $PATH is as follows:
/Users/sherwyn/.rvm/gems/ruby-2.0.0-p353/bin:
/Users/sherwyn/.rvm/gems/ruby-2.0.0-p353@global/bin:
/Users/sherwyn/.rvm/rubies/ruby-2.0.0-p353/bin:
/Users/sherwyn/.rvm/bin:/usr/bin:/bin:
/usr/sbin:/sbin:
/usr/local/bin:/opt/X11/bin:
/Users/sherwyn/.rvm/bin:
running which ruby
gives me this:
/Users/sherwyn/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
I get the error no such file or directory
when I run $PATH.
rvm list
turns no error out
I also can't run rails -v
, as it gives me the error:
ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead.
Not sure what to try, any help is greatly appreciated
I think my system is running rails version 0.9.5 for some strange reason.
/Users/sherwyn/.rvm/gems/ruby-2.0.0-p353/gems/rails-0.9.5/Rakefile:3:in `<top (required)>'
/Users/sherwyn/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/Users/sherwyn/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'
I've been using rails 4.0.2, not sure whats going on here...
-bash: cd: /Users/sherwyn/Users/sherwyn/.rvm/gems/ruby-2.0.0-p353/bin: No such file or directory
I uninstalled the old version of rails
gem uninstall rails '0.9.5'
which allowed me to do rails -v
and work with 4.0.2.
When I say "run $PATH" I mean I type "$PATH" into the console.
vendor/bundle/ruby/2.0.0/gems/daemons-1.1.9/Rakefile:require 'rake/rdoctask'
vendor/bundle/ruby/2.0.0/gems/formatador-0.2.4/Rakefile:require 'rake/rdoctask'
vendor/bundle/ruby/2.0.0/gems/mailcatcher-0.2.4/Rakefile:require 'rake/rdoctask'
vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/doc/release_notes/rake-10.0.0.rdoc:* The deprecated <tt>rake/rdoctask.rb</tt> library has been removed.
vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/doc/release_notes/rake-10.0.1.rdoc:* The deprecated <tt>rake/rdoctask.rb</tt> library has been removed.
vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/doc/release_notes/rake-10.0.2.rdoc:* The deprecated <tt>rake/rdoctask.rb</tt> library has been removed.
vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/doc/release_notes/rake-10.0.3.rdoc:* The deprecated <tt>rake/rdoctask.rb</tt> library has been removed.
vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/lib/rake/rdoctask.rb:fail "ERROR: 'rake/rdoctask' is obsolete and no longer supported. " +
vendor/bundle/ruby/2.0.0/gems/rake-10.1.1/Rakefile: 'lib/rake/rdoctask.rb',
vendor/bundle/ruby/2.0.0/gems/rdoc-4.1.1/History.rdoc: * Added rdoc/task.rb containing a replacement for rake/rdoctask.rb. Use
vendor/bundle/ruby/2.0.0/gems/tzinfo-0.3.38/Rakefile:require 'rake/rdoctask'
Pay attention to all gems that use the rdoctask
, probably they require to be updated. You can make shure in it, by entering into rails project folder, and issuing grep rdoctask * -r
.
If some of your gems use the vendor/bundle/
folder, you shall to move it to control by [tag;bundler], because since ruby-on-rails-4 the folder vendor/
is deprecated for plugins, and can be used for gems only in case, if you use non open-source or easy-to-install gems, like gems with closed property, or app-specific.
Use rvm/rbenv environments to keep gemsets up-to-date, and away of the project. Because it is useful thing to split the keep areas for various rails apps, so you will avoid encountering the similar problems that you have, to approximate to real work using heroku environment, or other servers.
If you issue bundle show rails
and get the path not leading to /usr/local
that means you used bundler version of rails that correctly load your app with bundle exec
. So, with bundle exec
you have used non-system ruby, with that you avoid the problems. I recommend to place rvm paths, before system in the path variable.
When you use rvm/rbenv don use sudo operations, if you did it already, setup proper rights to the folder:
sudo chown -R sherwyn /Users/sherwyn/.rvm
Setup the .ruby-version, and .ruby-gemset properly for each rails app you used:
echo ruby-2.0.0 > .ruby-version
echo itagora > .ruby-gemset
then reenter to the app folder:
cd ..
cd app_folder
Take a look into the answer on notice about heroku-toolbelt installation.