0

following my question here, I now set up a linux system trying to get it running. To repeat:

  • I have a website developed in RoR v 4.2.4 on a MAC OS X system
  • We need to adapt this website a bit and then deploy it on a server (the new linux system can be used later for the server)

This time I could update all the gems without a problem. bundle check says that all dependencies are satisfied. Unfortunately when i try to start the server to test the website with rails server the following error occours

    Array values in the parameter to `Gem.paths=` are deprecated.
    Please use a String or nil.
    An Array ({"GEM_PATH"=>["/home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0", "/home/XWebsite/.gem/ruby/2.4.0"]}) was passed in from bin/rails:3:in `load'
    /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thread_safe-0.3.5/lib/thread_safe/cache.rb:155: warning: constant ::Fixnum is deprecated
    => Booting Puma
    => Rails 4.2.4 application starting in development on http://localhost:3000
    => Run `rails server -h` for more startup options
    => Ctrl-C to shutdown server
    /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thread_safe-0.3.5/lib/thread_safe/cache.rb:155: warning: constant ::Fixnum is deprecated
    /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
    /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
    Exiting
    /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:124:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)
    from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
    from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
     ... 4088 levels...
    from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/XWebsite/XWebsite/bin/spring:13:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'

We also tried Webrick as the server but the error is the same with the exception of: 'Booting WEBrick'

Creating/Developping a new website with rails new blog and running the server works perfectly on the linux system.

Thanks a lot for your help in advance

Community
  • 1
  • 1
CaptIglu
  • 93
  • 8
  • Thanks! This at least fixed the first error: The first 3 lines of the error-message are gone. But from the line `/home/XWebsite [...] cache.rb:155: warning: constant ::Fixnum is deprecated` the message remains the same – CaptIglu Jan 26 '17 at 15:39
  • What's the ruby version you are using ?? – Ryad Boubaker Jan 26 '17 at 15:46
  • `ruby 2.4.0p0 (2016-12-24 revision 57164)` and Rails 5.0.1, but the webiste was developped in rails 4.2.4 – CaptIglu Jan 26 '17 at 16:07
  • please consider using rails 4.2 and a ruby version compatible with your rails 4.2.4 project – Ryad Boubaker Jan 26 '17 at 16:30
  • Now installed `ruby 2.2.6p396` and `Rails 4.2.4`. Unfortunately the same problem. – CaptIglu Jan 26 '17 at 16:48
  • 1
    Are you using the [thread_safe](https://github.com/ruby-concurrency/thread_safe) gem? If you look at the README, it is deprecated in favor of [concurrent-ruby](https://github.com/ruby-concurrency/concurrent-ruby) – max pleaner Jan 26 '17 at 18:31
  • yes, we use thread_safe (0.3.5). concurrent-ruby is installed in v 1.0.4. Both gems are listed in the gemfile.lock. Can I just change the gemfile.lock and replace thread_safe with concurrent-ruby? Or what about the dependenies to (e.g.) activesupport? – CaptIglu Jan 27 '17 at 08:41

1 Answers1

0
  1. bundle update spring
  2. bundle exec spring binstub --remove --all
  3. bundle exec spring binstub --all