Unable to use locally mounted stones

I am trying to run the Ruby on Rails website on shared hosting. When I get rake db:create (or rake in general), following this guide http://guides.rubyonrails.org/v2.3.8/getting_started.html I get

ERROR: "rake / rdoctask" is deprecated and is no longer supported. Use 'rdoc / task' instead (available in RDoc 2.4.2+).

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 deprecated and is no longer supported ), but my problem is that other versions are installed globally in the system my hosting provider and for some reason global versions override local ones.

I also tried gem install bundler to try to specify versions (as suggested here Use an earlier version of Rake ), but bundle responds

/usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (> = 0) among [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 do not have an RVM installed by my hosting provider that may have allowed me to do something like this RVM did not set the correct gem path .

Curious gem which rake gives me

~ / ruby ​​/ gems / gems / rivers-0.8.7 / Library / rake.rb

(the home directory is hidden 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 ': there is no such file to download - bundler (LoadError) from / home / ko 64eto / ruby ​​/ gems / gems /bundler-1.3.5/bin/bundle:7

What can I do to resolve the rake vs rdoc conflict. Should I ask my hosting provider to install RVM or can I do something else? If I contact them, is there any other option that I could ask them (for example, ask them to install the package globally or update rdoc)?

+4
source share
1 answer

What version of Rails are you using? Can you share your gemfile?

If you are using Rails 3.2.x, you can try installing install --deployment. Your hosting provider may already have a package installed. Is the delivery kit installed? Try to talk about what you see.

If the IS package is installed, then you want to try compiling exec rake db: setup or bundle exec rake db: create. Then the package will use the rake version in your gemfile.

0
source

Source: https://habr.com/ru/post/1481410/


All Articles