0

I have updated Ruby to 2.7.1. on Mac 10.15.5 Catalina and am trying to access older ruby applications that I had previously worked on. After I set the bundler to an appropriate version and bundle updated I am getting this error when I attempt to run rails server:

Traceback (most recent call last):
22: from bin/rails:4:in `<main>'
21: from bin/rails:4:in `require'
20: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
19: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
18: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:73:in `server'
17: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
16: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:123:in `require'
15: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/commands/server.rb:4:in `<top (required)>'
14: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/commands/server.rb:4:in `require'
13: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails.rb:11:in `<top (required)>'
12: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails.rb:11:in `require'
11: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/application.rb:6:in `<top (required)>'
10: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/application.rb:6:in `require'
 9: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/engine.rb:1:in `<top (required)>'
 8: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/engine.rb:1:in `require'
 7: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/railtie.rb:2:in `<top (required)>'
 6: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/railtie.rb:2:in `require'
 5: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties-4.2.0/lib/rails/configuration.rb:2:in `<top (required)>'
 4: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/railties 4.2.0/lib/rails/configuration.rb:2:in `require' 
 3: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/activesupport-4.2.0/lib/active_support/core_ext/object.rb:3:in `<top (required)>'
 2: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/activesupport-4.2.0/lib/active_support/core_ext/object.rb:3:in `require' 
 1: from /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/activesupport-4.2.0/lib/active_support/core_ext/object/duplicable.rb:80:in `<top (required)>' /Users/corneliusmurphy/photogram_final/vendor/cache/ruby/2.7.0/gems/activesupport-4.2.0/lib/active_support/core_ext/object/duplicable.rb:85:in 
    `<class:BigDecimal>': undefined method `new' for BigDecimal:Class (NoMethodError)

Additional info

ruby -v ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]
rails -v Rails 6.0.2.2
gem env RubyGems Environment:
 - RUBYGEMS VERSION: 3.1.2
 - RUBY VERSION: 2.7.1 (2020-03-31 patchlevel 83) [x86_64-darwin19]
 - INSTALLATION DIRECTORY: /Users/corneliusmurphy/.rvm/gems/ruby-2.7.1
 - USER INSTALLATION DIRECTORY: /Users/corneliusmurphy/.gem/ruby/2.7.0
 - RUBY EXECUTABLE: /Users/corneliusmurphy/.rvm/rubies/ruby-2.7.1/bin/ruby
- GIT EXECUTABLE: /usr/local/bin/git
- EXECUTABLE DIRECTORY: /Users/corneliusmurphy/.rvm/gems/ruby-2.7.1/bin
- SPEC CACHE DIRECTORY: /Users/corneliusmurphy/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/corneliusmurphy/.rvm/rubies/ruby-2.7.1/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-19
- GEM PATHS:
 - /Users/corneliusmurphy/.rvm/gems/ruby-2.7.1
 - /Users/corneliusmurphy/.rvm/rubies/ruby-2.7.1/lib/ruby/gems/2.7.0
- GEM CONFIGURATION:
 - :update_sources => true
 - :verbose => true
 - :backtrace => false
 - :bulk_threshold => 1000
- REMOTE SOURCES:
 - https://rubygems.org/
- SHELL PATH:
 - /Users/corneliusmurphy/.rvm/gems/ruby-2.7.1/bin
 - /Users/corneliusmurphy/.rvm/gems/ruby-2.7.1@global/bin
 - /Users/corneliusmurphy/.rvm/rubies/ruby-2.7.1/bin
 - /Users/corneliusmurphy/.rbenv/bin
 - /usr/local/bin
 - /usr/bin
  - /bin
   - /usr/sbin
   - /sbin
   - /Users/corneliusmurphy/.rvm/bin
Fabian Winkler
  • 1,401
  • 16
  • 24
Zippo9
  • 706
  • 2
  • 5
  • 24
  • 1
    Use rvm or rbenv to work with different version or ruby and gems. You should define ruby version and gemset to work with specific ruby and other gems. – Amit Patel Apr 16 '20 at 07:06
  • From the stack trace it look like your application uses Ruby on Rails 4.2.0. Please note that that version is certainly not compatible with the latest Ruby version. It is recommended to run this version of Rails on [Ruby 1.9.3 - 2.4.5](https://stackoverflow.com/a/51810150/2483313). – spickermann Apr 16 '20 at 08:39
  • ^^ This. You can't usually upgrade a language version by several years, without also doing something to upgrade the project's libraries. Before switching to ruby 2.7, you should upgrade the project to at least rails 5, or ideally rails 6. Rails 4 is no longer supported. – Tom Lord Apr 16 '20 at 09:58

0 Answers0