Previously, json was loaded, because it was in dependency chain of some
gem. They dropped the dependencies from all the Rails related gems (this
was the last one [1]), so the fix is to add


gem 'json'


into your Gemfile and install rubygem-json of course.


Vít


[1] https://github.com/rack/rack/pull/1011




Dne 5.7.2016 v 14:08 Marwan Rabbâa napsal(a):
> With a simple Gemfile
>
> ******************************
> source 'https://rubygems.org'
>
>
> gem "rails", "~> 5.0.0"
> gem "pg", "~> 0.18"
> gem "devise", "~> 4.2.0"
>
> group :development, :test do
>   gem "byebug"
> end
>
> group :development do
>   gem "web-console"
>   gem "listen"
>   gem "spring"
>   gem "spring-watcher-listen"
> end
> ***************
>
> *LoadError: cannot load such file -- json*
>
> on a fresh rails project
>
> and on Docker
>
> ***********************************************************
> /usr/local/share/gems/gems/activesupport-5.0.0/lib/active_support/core_ext/object/json.rb:2:in
> `require': cannot load such file -- json (LoadError)
>     from
> /usr/local/share/gems/gems/activesupport-5.0.0/lib/active_support/core_ext/object/json.rb:2:in
> `<top (required)>'
>     from
> /usr/local/share/gems/gems/activesupport-5.0.0/lib/active_support/core_ext/object.rb:11:in
> `require'
>     from
> /usr/local/share/gems/gems/activesupport-5.0.0/lib/active_support/core_ext/object.rb:11:in
> `<top (required)>'
>     from
> /usr/local/share/gems/gems/railties-5.0.0/lib/rails/configuration.rb:2:in
> `require'
>     from
> /usr/local/share/gems/gems/railties-5.0.0/lib/rails/configuration.rb:2:in
> `<top (required)>'
>     from
> /usr/local/share/gems/gems/railties-5.0.0/lib/rails/railtie/configuration.rb:1:in
> `require'
>     from
> /usr/local/share/gems/gems/railties-5.0.0/lib/rails/railtie/configuration.rb:1:in
> `<top (required)>'
>     from
> /usr/local/share/gems/gems/railties-5.0.0/lib/rails/railtie.rb:216:in
> `require'
>     from
> /usr/local/share/gems/gems/railties-5.0.0/lib/rails/railtie.rb:216:in
> `config'
>     from
> /usr/local/share/gems/gems/railties-5.0.0/lib/rails/railtie.rb:122:in
> `config'
>     from
> /usr/local/share/gems/gems/activesupport-5.0.0/lib/active_support/i18n_railtie.rb:7:in
> `<class:Railtie>'
>     from
> /usr/local/share/gems/gems/activesupport-5.0.0/lib/active_support/i18n_railtie.rb:6:in
> `<module:I18n>'
>     from
> /usr/local/share/gems/gems/activesupport-5.0.0/lib/active_support/i18n_railtie.rb:5:in
> `<top (required)>'
>     from
> /usr/local/share/gems/gems/activesupport-5.0.0/lib/active_support/railtie.rb:2:in
> `require'
>     from
> /usr/local/share/gems/gems/activesupport-5.0.0/lib/active_support/railtie.rb:2:in
> `<top (required)>'
>     from /usr/local/share/gems/gems/railties-5.0.0/lib/rails.rb:14:in
> `require'
>     from /usr/local/share/gems/gems/railties-5.0.0/lib/rails.rb:14:in
> `<top (required)>'
>     from
> /usr/local/share/gems/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in
> `require'
>     from
> /usr/local/share/gems/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in
> `block (2 levels) in require'
>     from
> /usr/local/share/gems/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in
> `each'
>     from
> /usr/local/share/gems/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in
> `block in require'
>     from
> /usr/local/share/gems/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in
> `each'
>     from
> /usr/local/share/gems/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in
> `require'
>     from
> /usr/local/share/gems/gems/bundler-1.12.5/lib/bundler/inline.rb:60:in
> `gemfile'
>     from /tmp/test.rb:8:in `<main>'
>
>
>
>
>
> 2016-07-05 13:46 GMT+02:00 Dominic Cleal <[email protected]
> <mailto:[email protected]>>:
>
>     On 05/07/16 12:41, Marwan Rabbâa wrote:
>     > I have the same error with this package
>
>     And what error's that precisely?
>
>     --
>     Dominic Cleal
>     [email protected] <mailto:[email protected]>
>     _______________________________________________
>     ruby-sig mailing list
>     [email protected]
>     <mailto:[email protected]>
>     
> https://lists.fedoraproject.org/admin/lists/[email protected]
>
>
>
>
> _______________________________________________
> ruby-sig mailing list
> [email protected]
> https://lists.fedoraproject.org/admin/lists/[email protected]

_______________________________________________
ruby-sig mailing list
[email protected]
https://lists.fedoraproject.org/admin/lists/[email protected]

Reply via email to