I am trying to run a Ruby on Rails website on a shared hosting. When I get to rake db:create
(or rake
at all) following this tutorial http://guides.rubyonrails.org/v2.3.8/getting_started.html I get
ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead.
I tried gem install rdoc -v 2.4.2
(also tried gem install rake --version 0.8.7
as suggested here ERROR: 'rake/rdoctask' is obsolete and no longer supported), but my problem is that the other versions are installed globally on the system by my hosting provider and for whatever reasons the global versions override the local ones.
I also tried gem install bundler
to try to specify versions (as suggested here Use older version of Rake), but bundle
responds with
/usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [actionmailer-2.3.15, actionpack-2.3.15, activerecord-2.3.15, activerecord-mysql2-adapter-0.0.3, activeresource-2.3.15, activesupport-2.3.15, cgi_multipart_eof_fix-2.5.0, daemons-1.1.9, fastthread-1.0.7, gem_plugin-0.2.3, mongrel-1.1.5, mysql2-0.3.11, rack-1.1.5, rails-2.3.15, rake-10.0.3, rubygems-update-1.8.25, sqlite3-1.3.7] (Gem::LoadError)
I don't have RVM installed by my hosting provider, which might have allowed me to do something like this RVM doesn't set correct gem path.
Curiously enough gem which rake
gives me
~/ruby/gems/gems/rake-0.8.7/lib/rake.rb
(home directory concealed by me), but ~/ruby/gems/gems/rake-0.8.7/bin/rake --version
gives me
rake, version 10.0.3
I get a similar result about rdoc, and ~/ruby/gems/gems/bundler-1.3.5/bin/bundle --version
gives me
/home/ko64eto/ruby/gems/gems/bundler-1.3.5/bin/bundle:7:in `require': no such file to load -- bundler (LoadError) from /home/ko64eto/ruby/gems/gems/bundler-1.3.5/bin/bundle:7
What can I do to resolve the rake vs rdoc conflict. Do I need to ask my hosting provider to install RVM or can I do something else? If I contact them, is there any other option I could ask them for (like asking them to install bundler globally, or update rdoc)?