Hello
My current problem is when I'm running my rails server (rails console, rails server) I get the warning added by @tenderlove in https://github.com/rubygems/rubygems/commit/a6b69e94232166dda441bbb69b64cf90562eebfd . The problem is the answer doesn't help me a lot to fix it. I get
Array values in the parameter are deprecated. Please use a String or nil.
An Array was passed in from bin/rails:3:in `load'
How can I get more infos to be able to fix this warning?
This issue is related to:
gemHere are my current environment details:
$ gem env version
2.6.2
$ rails --version
Rails 4.2.5.2
I have the same problem
Here are my current environment details:
$ gem env version
2.6.2
$ rails --version
Rails 4.2.1
I started seeing this yesterday after upgrading my Rails 4.2.6 app to Ruby 2.3.0 via the official Ruby Docker image (ruby:2.3.0-slim). Rubygems v2.6.2. Wish I knew how to resolve.
Fixed by applying the same join you see here to the line 11 of bin/spring:
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(File::PATH_SEPARATOR) }
Thanks @haggen. That also fixed my issue. A PR has been made for Spring. https://github.com/rails/spring/pull/473/files
Thank You @haggen Your line lights our app right up. I ran into this on the rails -v command. The Lovely error message led me right here on a search. Running 4.2.5.1 on 2.3.0p0
If you came to this issue by googling the error specified in the description of this issue, you should know that it has already been fixed in spring-1.6.4 and all you need to do is to update to latest spring and regenerate binstubs, like this:
$ bundle update spring && bundle exec spring binstub --remove --all && bundle exec spring binstub --all
I am still getting it in rails 4.2.8 and ruby 2.4.1-x as below.
$ rails s
Array values in the parameter to Gem.paths= are deprecated.
Please use a String or nil.
An Array ({"GEM_PATH"=>["/home/fabritronix/.rvm/gems/ruby-2.4.1", "/home/fabritronix/.rvm/gems/ruby-2.4.1@global"]}) was passed in from bin/rails:3:in load'
=> Booting Puma
=> Rails 4.2.8 application starting in development on http://localhost:3000
=> Runrails server -h` for more startup options
=> Ctrl-C to shutdown server
Puma starting in single mode...
I'm not sure how am I affected with this when spring is not installed. (Env: Production). I'm getting this same warning when opening console.
Array values in the parameter to `Gem.paths=` are deprecated.
Please use a String or nil.
An Array ({"GEM_PATH"=>["/home/**redacted***/vendor/bundle/ruby/2.2.0"]}) was passed in from bin/rails:3:in `load'
Loading production environment (Rails 4.2.6)
rails: 4.2.6
ruby: 2.2.3 [Weirdly warning shows ruby 2.2.0 in the path :confused: ]
Env: production
@NeoElit, check your bin/rails file in your application directory. You'll likely find that array on line 3.
Most helpful comment
Fixed by applying the same
joinyou see here to the line 11 ofbin/spring: