phantom missing gems caused by project iml file
I wish to report that in the "Ruby SDK and Gems" panel of the project settings,
I had been getting the message
"Gems required for project are not attached"
(highlighting in red the gem versions om 1.0.0, lyber-core 0.9.7.2 & rack 1.1.0),
until I manually edited the project's .iml file to remove the following lines:
<orderEntry type="library" name="[gem] om (v1.0.0, null)" level="application" />
<orderEntry type="library" name="[gem] lyber-core (v0.9.7.2, null)" level="application" />
<orderEntry type="library" name="[gem] rack (v1.1.0, null)" level="application" />
These lines specified older versions of dependency gems than the ones that are currently installed by a bundle install (as verified by doing a gem list, and a review of the Gemfile and Gemfile.lock project files)
The error message persisted even after doing a "rvm gemset empty" and a fresh "bundle install", both from the command line and from the RubyMine tools menu. It was occuring in RubyMine 3.1 release and after an upgrade to the latest EAP release. I could not find any references to the old gem versions in my project code or anywhere else other than the project's .iml file. Editing that file seems to have resolved the issue, but I am curious as to how this situation might have arisen, and whether RubyMine should have cleaned up these XML elements itself.
I am using
* Mac OS X 10.6.6
* RubyMine (EAP) RM-103.170
* RVM 1.0.16
* RubyGems 1.5.2
* Bundler 1.0.10
My project has a .rvmrc file that contains
rvm use 1.8.7@dor-gsb-robots
The "Ruby SDK and Gems" panel showed that I have the desired ruby version and gemset selected
Tools -> Show Gem Environment produces the following output
RubyGems Environment:
RUBYGEMS VERSION: 1.5.2
RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.4.0]
INSTALLATION DIRECTORY: /Users/rnanders/.rvm/gems/ruby-1.8.7-p302@dor-gsb-robots
RUBY EXECUTABLE: /Users/rnanders/.rvm/rubies/ruby-1.8.7-p302/bin/ruby
EXECUTABLE DIRECTORY: /Users/rnanders/.rvm/gems/ruby-1.8.7-p302@dor-gsb-robots/bin
RUBYGEMS PLATFORMS:
ruby
x86-darwin-10
GEM PATHS:
/Users/rnanders/.rvm/gems/ruby-1.8.7-p302@dor-gsb-robots
/Users/rnanders/.rvm/gems/ruby-1.8.7-p302@global
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:benchmark => false
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
http://rubygems.org/
----------------------
IDE: JetBrains RubyMine (EAP) RM-103.170, build #RM-103.170
RubyMine SDK Environment:
Sdk: Ruby SDK 1.8.7-p302 [dor-gsb-robots]
Sdk Version: ver.1.8.7 p302
Ruby Interpreter: /Users/rnanders/.rvm/rubies/ruby-1.8.7-p302/bin/ruby
RVM Sdk: yes, gemset:dor-gsb-robots
Sdk Language Level: 1.8
Sdk Load Path:
/Users/rnanders/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8
/Users/rnanders/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/i686-darwin10.4.0
/Users/rnanders/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby
/Users/rnanders/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/vendor_ruby/1.8
/Users/rnanders/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/vendor_ruby/1.8/i686-darwin10.4.0
/Users/rnanders/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/vendor_ruby
/Users/rnanders/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8
/Users/rnanders/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/i686-darwin10.4.0
/Applications/RubyMine-103.170.app/rubystubs18
Sdk Gem paths:
file:///Users/rnanders/.rvm/gems/ruby-1.8.7-p302@dor-gsb-robots/bundler/gems
file:///Users/rnanders/.rvm/gems/ruby-1.8.7-p302@dor-gsb-robots/gems
file:///Users/rnanders/.rvm/gems/ruby-1.8.7-p302@global/gems
note that there is no ruby-1.8.7-p302@dor-gsb-robots/bundler/gems directory on my system
请先登录再写评论。