basgren / railways

A plugin for RubyMine and IntelliJ IDEA Ultimate that adds a panel with routes of Ruby on Rails application.
MIT License
46 stars 18 forks source link

Plugin reports activemodel-serializers-xml missing #37

Closed shamca65 closed 5 years ago

shamca65 commented 5 years ago

Using Rubymine 2018.3.3 Ruby 2.5.0 Rals 5.2.2

Refreshing routes, Railways complains that activemodel-serializers-xml is missing, but gem is installed.

Bundler::GemNotFound: Could not find activemodel-serializers-xml-1.0.2 in any of the sources /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/spec_set.rb:91:in block in materialize' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/spec_set.rb:85:inmap!' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/spec_set.rb:85:in materialize' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:170:inspecs' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:237:in specs_for' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:226:inrequested_specs' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:108:in block in definition_method' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:20:insetup' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:107:in setup' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/setup.rb:20:in<top (required)>' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' /Users/shaun/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:inrequire'

basgren commented 5 years ago

Railways plugin doesn't require any gems to be installed. It just runs rake routes from within IDE and parses the result, reporting any errors if present. Usually these errors can be reproduced by running the same command in console and if they still occur it means that something is wrong with the environment.

Could you please check if rake routes runs without errors in your console?

shamca65 commented 5 years ago

rake routes runs fine in the terminal. Very odd thing.

Are there logs I can send you?

Cheers, Shaun

basgren commented 5 years ago

Indeed it's very strange.

IDE runs rake tasks taking into account project settings, it uses specific ruby version and gemset from selected ruby SDK, so this might be the problem if ruby version is incorrect. You can check it in IDE: Settings -> Languages and Frameworks -> Ruby SDK and Gems. Please make sure the correct ruby version is selected and that activemodel-serializers-xml-1.0.2 gem is present in the list for chosen ruby version.

If the gem is missing, you can install it from IDE: Tools -> Bundler -> Install. This will install gems for the same SDK which is configured for the project.

And to make sure the configuration is correct, please try to run routes task right from RubyMine: menu Tools -> Run Rake Task..., then select routes in the list and check the output (actually, the plugin does almost the same under the hood).

basgren commented 5 years ago

Closing this due to inactivity. Please reopen if related issue is still actual.