I typed the following:
gem install omniauth
In my environment.rb
file, I also have:
config.gem "omniauth"
However, I get these errors:
no such file to load -- omniauth/core
Missing these required gems:
omniauth
I'm confused: I do a rake gems:install and don't get an error (I don't get a message back, either). But then I try to run script/server and it says I need to do rake gems:install!
When I remove the config.gem "omniauth" from environment.rb, I get this:
c:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:in `load_missing_constant': unin
itialized constant OmniAuth (NameError)
Now that Rails 3 is using bundler, you need to make it explicit that you want access to a specific gem in your app. To do this, go into your Gemfile
(in the root directory of your project) add this line:
gem 'omniauth'
then run bundle install
in the project directory, and you should be good to go. bundle install
simply makes sure that all gems and dependencies are installed on the current system. Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With