RubyMine gem bundle management
Hey Everybody,
I'm working on a project that requires older versions of gems to be installed.
I've been reading through the rubymine documentation and can't figure out how to remove the recent version?
I'm able to install the old versions, but how do I set that older version as the active gem.
I'm use to gemfiles and CLI, so this rubymine implementation is a little confusing.
Lastly, is it possible to install just the gems in my gemfile in Rubymine?
This would solve all my problems!
Thanks,
Nick
Please sign in to leave a comment.
Hi,
RM uses Gemfile and Gemfile.lock to collect list of gems an application uses.
So, if your Gemfile specify some old versin of a gem then RM will use it (at least it should ;)
Could you please provide example of gem specification in your Gemfile for which you believe RM uses incorrect version (also please explain why you think so)
Regards, Oleg.
Only two of the gems in my gemfile are not the correct versions in the RubyMine gem bundler.
Here is my gemfile.
source "http://rubygems.org"
platforms :jruby do
gem "rake", "0.8.7"
gem "rack", "1.2.2"
gem "rspec", "<=2.5.2"
gem "rspec-core", "2.5.2"
gem "rspec-expectations", "2.5.0"
gem "rspec-mocks", "2.5.0"
gem "factory_girl", "1.3.3"
gem "cucumber", "0.10.2", :require => "gherkin"
gem "gherkin", "2.3.5"
gem "json", "1.4.6", :require => "gherkin"
gem "arel", "2.0.6", :require => "activerecord"
gem "savon"
gem "crack", "0.1.8", :require => "savon"
gem "activerecord", "3.0.3"
gem "activerecord-jdbc-adapter", "1.1.0"
gem "bouncy-castle-java", "1.5.0146.1"
gem "celerity", "0.8.9"
gem "jruby-openssl", "0.7.4"
gem "ffi", "1.0.10"
gem "net-ssh", "2.1.4"
gem "net-sftp", "2.0.5"
gem "log4r", "1.1.9"
gem "watir-webdriver", "0.3.9"
gem "childprocess", "0.2.2"
gem "jruby-win32ole"
end
platforms :ruby do
gem "rake", "0.8.7"
gem "rack", "1.2.2"
gem "rspec", "<=2.5.2"
gem "rspec-core", "2.5.2"
gem "rspec-expectations", "2.5.0"
gem "rspec-mocks", "2.5.0"
gem "factory_girl", "1.3.3"
gem "cucumber", "0.10.2", :require => "gherkin"
gem "gherkin", "2.3.5"
gem "arel", "2.0.6", :require => "activerecord"
gem "savon"
gem "crack", "0.1.8", :require => "savon"
gem "activerecord", "3.0.3"
gem "rubygems-update", "1.3.7"
gem "watir", "1.8.1"
end
I believe that perhaps the feature I'm trying to run is using gherkin 2.1.2.1 instead of 2.3.5.
This error led me to suspect some sort of gem dependency mis-match:
NoMethodError: undefined method `__persistent__=' for Java::JavaUtil::ArrayList:Class
GherkinBuilder at C:/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/cucumber-1.3.8/bin/../lib/cucumber/parser/gherkin_builder.rb:81
Parser at C:/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/cucumber-1.3.8/bin/../lib/cucumber/parser/gherkin_builder.rb:11
Cucumber at C:/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/cucumber-1.3.8/bin/../lib/cucumber/parser/gherkin_builder.rb:7
(root) at C:/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/cucumber-1.3.8/bin/../lib/cucumber/parser/gherkin_builder.rb:6
require at org/jruby/RubyKernel.java:1038
require at C:/jruby-1.6.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55
(root) at C:/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/cucumber-1.3.8/bin/../lib/cucumber/parser/gherkin_builder.rb:1
require at org/jruby/RubyKernel.java:1038
require at C:/jruby-1.6.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55
(root) at C:/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/cucumber-1.3.8/bin/../lib/cucumber/feature_file.rb:11
require at org/jruby/RubyKernel.java:1038
require at C:/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/cucumber-1.3.8/bin/../lib/cucumber/cli/main.rb:55
(root) at C:/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/cucumber-1.3.8/bin/cucumber:11
load at org/jruby/RubyKernel.java:1063
(root) at C:/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/cucumber-1.3.8/bin/cucumber:19
load at org/jruby/RubyKernel.java:1063
(root) at -e:1
Process finished with exit code 1
gherkin_builder.rb
80 java_import java.util.ArrayList
81 ArrayList.__persistent__ = true
82 end
Could you please provie your Gemfile.lock file (please to not paste it, just attach)
Regards, Oleg.