Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start rails console #668

Closed
darkBuddha opened this issue Jan 5, 2022 · 5 comments
Closed

Unable to start rails console #668

darkBuddha opened this issue Jan 5, 2022 · 5 comments

Comments

@darkBuddha
Copy link

darkBuddha commented Jan 5, 2022

  • Ruby 2.7.5, can't upgrade due to incompatible PayPal SDK.
  • Rails 7.0.0

Now i can't enter the rails console, neither in production nor development:

/home/x/.rvm/gems/ruby-2.7.5/gems/spring-2.1.1/lib/spring/application.rb:103:in `block in preload': undefined method `mechanism=' for ActiveSupport::Dependencies:Module (NoMethodError)

Any idea? Thanks.

@darkBuddha
Copy link
Author

I upgraded to Ruby 3.0.3, the issue still persists.

@catacs
Copy link

catacs commented Jan 27, 2022

Hey @darkBuddha 👋
I have the same issue (with ruby 3.0.3 and rails 7.0.1).
How did you solved this issue?
Thanks 🙏

@darkBuddha
Copy link
Author

Hey @darkBuddha 👋 I have the same issue (with ruby 3.0.3 and rails 7.0.1). How did you solved this issue? Thanks 🙏

reverted to Rails 6.1.4.4

@catacs
Copy link

catacs commented Jan 27, 2022

Just played a bit with spring versions.

Some context:
I used these 2 gems for spring:

  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'

And it generates this configuration in Gemfile.lock:

    spring (2.1.1)
    spring-watcher-listen (2.0.1)
      listen (>= 2.7, < 4.0)
      spring (>= 1.2, < 3.0)

That means spring-watcher-listen its limiting the spring version to 2.1.1 (last version is 4.0.0). I decided to remove spring-watcher-listen and upgrade the spring version to latest one.

Then run bundle exec spring binstub --all to update the files. and finally voilà, looks like now the project works.

@siddhant-mohan
Copy link

tried everything, but still not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants