Reputation: 311
I am facing very strange error when I run 'rails -v' command on my terminal (Mac El Capitan) it shows me the error:
/Users/paras/.rvm/gems/ruby-2.3.0/bin/rails:22:in `<main>': undefined method `activate_bin_path' for Gem:Module (NoMethodError)
from /Users/paras/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/paras/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Parass-MacBook-Pro:hackathon_1 paras$ rails -v
/Users/paras/.rvm/gems/ruby-2.3.0/bin/rails:22:in `<main>': undefined method `activate_bin_path' for Gem:Module (NoMethodError)
from /Users/paras/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/paras/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
and also when I run 'rails s'. After re-installing rails I get the following:
== 20160404103035 CreateEvents: migrating =====================================
-- create_table(:events) rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedTable: ERROR: relation "users" does not exist :
ALTER TABLE "events" ADD CONSTRAINT "fk_rails_0cb5590091" FOREIGN KEY ("user_id") /Users/paras/.rvm/gems/ruby-2.3.0@hackathon_1/gems/activerecord-4.2.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
and many more lines like above with different messages.
Please help me.
Upvotes: 0
Views: 2909
Reputation: 11245
It looks like this may be an issue with Rubygems 2.6.2 and Ruby 2.3.0. See https://github.com/bundler/bundler/issues/4381 and https://github.com/bundler/bundler/issues/4402.
Using Rubygems 2.6.1 via gem update --system 2.6.1
and reinstalling the Rails gem may resolve the issue for you.
Upvotes: 2