'bundle install' ignores the devise gem specified in the Gemfile
My Rails application is running so far and I decided to add the 'devise' gem in order to make user management easier. This is on Windows 7 x86. All programs involved are at开发者_JAVA百科 the currently latest stable version available (Ruby 1.9.2p290...)
'gem install devise' does work properly.
Then I added the line gem 'devise' into the Gemfile and ran 'bundle install'
Bundler ran its course, did not install the devise gem however. But it DID install the sqlite3 gem which I also specified in the same Gemfile. The devise gem and its dependencies are also listed in the Gemfile.lock - but neither 'bundle install' nor 'bundle update' will make a difference. Deleting the gems, caches, ~/.bundle/config yielded no discernible difference.
I also don't get an error message. Does anyone have an idea what I might be doing wrong here?
Yes, removing Gemfile.lock might help. First open and check if it really doesn't contain Devise.
You can check if Devise installed with:
gem list
You can see which version is bundled (if any) with:
bundle show devise
you can see all generators, if Devise installed it will popup in this list too.
rails generate
For dependency issues RVM is great on *nix system, I think it's copy is Pik on Win: https://github.com/vertiginous/pik - with this you can handle all your dependeny problems.
Hope this helped.
If you have done a gem install of devise and it's in your lock file then it's installed already, bundle install only installs gems that you don't have.
If you are having issues though you can delete your Gemfile.lock file then run bundle install again.
精彩评论