Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 2.2.2 issue: undefined method `activate_bin_path' for Gem:Module (NoMethodError)

Tags:

I am working on Rails 2.2.2 application. For this I installed rvm with Ruby version 1.9.3p551. There is no Gemfile for this application. So as mentioned in the environment.rb file I created a Gemfile with rails and sqlite3. While running rake db:create, I am facing the following issue.

whoami@myvm:~/Desktop/practice/store$ rake db:create /home/whoami/.rvm/gems/ruby-1.9.3-p551/bin/rake:22:in `<main>': undefined method `activate_bin_path' for Gem:Module (NoMethodError)     from /home/whoami/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `eval'     from /home/whoami/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `<main>' 

Please help me.

like image 982
user3189916 Avatar asked Jun 14 '16 07:06

user3189916


2 Answers

For me, (I am working with RVM) it worked just running:

gem update --system gem update bundler 
like image 180
Andrei Helo Avatar answered Sep 19 '22 11:09

Andrei Helo


Have you tried these commands

Rename /usr/lib/ruby/site_ruby/ to site_ruby.bak/ Run the following commands:

gem install rubygems-update enter code here update_rubygems 

If you get error then try the following instead:

ruby --disable-gems -S update_rubygems

like image 22
Vishal G Avatar answered Sep 22 '22 11:09

Vishal G