Rails 'Missing Required Gems' Error for Installed Gems

I know this was asked a few times earlier, but I tried these things and I still had no luck.

For a gem, mechanizeI continue to get the "These required gems are missing" error when running db:migrateon my production server.

Here's the complete error:

Missing these required gems:
  mechanize  

You're running:
  ruby 1.8.6.111 at /usr/bin/ruby1.8
  rubygems 1.3.5 at /home/user/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8

The output which rubyis/usr/bin/ruby

The output which gemis/usr/bin/gem

When I start gem list mechanize (1.0.0), it is definitely on the list.

What am I doing wrong here?

+3
source share
3 answers

, . , .

0

, , Try

rake gems:install
0

What is the conclusion which rake?

The output which rubyis equal /usr/bin/ruby, and the rake command reports /usr/bin/ruby1.8. If someone is not a symbolic link to another, I suspect that something is wrong in your environment.

Also, it looks like some gems are installed in your user folder. Have you tried installing the pearl of the whole system with sudo gem installor sudo rake gems:install?

0
source

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


All Articles