no such file to load -- openid/store/filesystem (Rails omniauth) - ruby-on-rails

This is first time I'm trying to use Omniauth. While I was testing https://github.com/pt/devise-omniauth-example this example from github I came across an error
.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': no such file to load -- openid/store/filesystem (LoadError)
Here is my Gemfile content
source 'http://rubygems.org'
gem 'rake'
gem 'rails'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'devise', :git => 'git://github.com/plataformatec/devise', :branch => 'master'
gem "omniauth", "1.0.1"
gem 'paperclip'
gem "simple_form", "~> 1.5.2"
gem 'twitter_oauth', '0.4.3'
gem "rest-client", "1.6.7", :require => "restclient"
gem "sluggable"
group :development, :test do
gem 'rspec-rails'
gem 'fixjour'
end
I search web but there was no luck.

According to this:
If you get "openid/store/filesystem (LoadError)" then you may need to add this to your Gemfile:
gem "oa-openid"

This is due to various versions of Gems you are using and the dependencies among them.
In the example at https://github.com/pt/devise-omniauth-example,
if you notice the Gemfile ,there is
gem 'omniauth', '0.2.0'
but in your Gemfile above, you are using
gem "omniauth", "1.0.1"

Add gem 'ruby-openid-apps-discovery', and add below in application.rb.
require 'omniauth-openid'
require 'openid'
require 'openid/store/filesystem'
require 'gapps_openid'

Related

bundle install circular dependencies

The following console logs should describe the issue
bundle install
Could not find multi_json-1.1.0 in any of the sources
Run `bundle install` to install missing gems.
bundle install asks me to bundle install.
Have tried: https://github.com/mpapis/rubygems-bundler/issues/4
Looked at: https://github.com/carlhuda/bundler/issues/865
Not sure where to go next.
Also of interest, if we comment all the gems from inside vendor/gems the bundle works fine.
source 'http://rubygems.org'
gem 'rails', '~> 3.2.2'
gem 'mysql2'
gem 'thin'
# Asset template engines
gem 'coffee-script'
gem 'uglifier'
gem 'sprockets'
gem 'less-js'
gem 'execjs'
gem 'nokogiri'
gem 'lucy'
gem 'babilu'
gem 'simple_form'
gem 'mechanize'
gem 'geoip'
gem 'less'
gem 'bb-ruby'
gem 'client_side_validations', "~> 3.2.0.beta.2"
gem 'client_side_validations-simple_form'
gem 'require_all'
#for avatars
gem 'paperclip'
gem 'rmagick'
gem "multipart-post"
gem 'gibberish'
# Memcached client
gem 'dalli'
#to support tables without auto-incrementing primary keys
gem 'composite_primary_keys', "~> 5.0.1"
gem 'calendar_helper', :require => 'calendar_helper'
gem 'jquery-rails'
gem 'capistrano'
gem 'capistrano-ext'
gem 'simple_form'
gem 'htmlentities'
gem 'will_paginate'
gem 'airbrake', :path => "vendor/gems/airbrake"
gem "uservoice", :path => "vendor/gems/uservoice"
# For spambots
gem "honeypot-captcha"
# Internationalization GUI
gem "tolk", :git => "http://github.com/miloops/tolk.git", :branch => "rails31"
gem "will-paginate-i18n"
gem "omniauth"
gem "omniauth-facebook"
gem "omniauth-justintv", :git => 'http://github.com/themindoverall/omniauth-justintv.git'
gem 'oauth'
gem 'rails-i18n'
# For rate limiting
gem "rack-throttle", :path => "vendor/gems/rack-throttle"
gem "xfire-api", :path => "vendor/gems/xfire-api"
gem "anametrix", :path => "vendor/gems/anametrix"
#To make ruby debug work see: http://stackoverflow.com/questions/6438116/rails-with-ruby-debugger-throw-symbol-not-found-ruby-current-thread-loaderro
group :development, :test do
#gem 'ruby-debug-base19', '0.11.26', :path => "~/.rvm/gems/ruby-1.9.3-p#{RUBY_PATCHLEVEL}/gems/ruby-debug-base19-0.11.26/"
#gem 'linecache19', '0.5.13', :path => "~/.rvm/gems/ruby-1.9.3-p#{RUBY_PATCHLEVEL}/gems/linecache19-0.5.13/"
#gem 'ruby-debug19', :require => 'ruby-debug'
gem 'ruby_parser'
end
group :test do
gem 'ruby-prof'
gem 'test-unit' # For performance testing
gem 'turn', :require => false
gem 'factory_girl_rails', "~> 1.0.1"
gem 'capybara', "~> 1.0.0"
gem 'database_cleaner', '~> 0.6.7'
gem 'rspec-rails', "~> 2.6.1"
gem 'cucumber-rails', "~> 1.0.0"
gem 'webrat', "~> 0.7.3"
gem 'autotest'
gem 'simplecov'
gem 'autotest-rails-pure'
gem 'simplecov', :require => false, :group => :test
gem 'spork'
end
group :production do
gem 'rack-google_analytics', :require => "rack/google_analytics"
end
Have you declared that gem in your Gemfile? Sometimes it helps to specify a specific version as you've done for some:
gem 'multi-json', '1.1.0'
If anyone turns out to be stuck on this what turned out to be the answer is one of our homegrown gems:
gem "xfire-api", :path => "vendor/gems/xfire-api"
had a require in it provided by a gem that was not specified in the gemspec. If you're stuck on this and have homegrown gems take a look through all your requires and makes sure all the files are provided by gems you specify in the Gemspec.

Rails: Bundle path source?

OK, I'm trying to figure out how to get a gem install that the install script fails due to a space in the path name. I've tried everything I could, but for some reason the bundle install still picks up the long path rather than the symlinked path I have without the spaces.
Where does it pick up these paths?
I've tried updating bundle config but it still list the long path as the path to the local app rather than the new symlink path. If I update, it only does it for the local user not the local app.
I am stuck and I've crashed my machine by trying to remove the space in the volume name, I've added all the environment variables I can think of, I'm at a loss to get the bundler to install without referencing the path with a space in it.
I've tried contacting the developers for the gem, no love. I just need to get the whole app to use the symlink path rather than the /Volumes/Macintosh HD/ path. Ideas? suggestions? crazy ideas? I'm willing to give anything a shot at this point.
Update 12/16:
Gem is FFI.
Here's the Gemfile:
source 'http://rubygems.org'
require 'rubygems'
gem 'rails', '3.0.8'
gem 'jquery-rails'
gem 'haml'
gem 'devise'
gem 'omniauth-openid'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'omniauth-github'
gem "settingslogic"
gem 'composite_primary_keys'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'squeel'
gem 'sqlite-ruby'
gem 'mysql2', '~> 0.2.6'
gem "bcrypt-ruby", :require => "bcrypt"
group :development, :test do
gem 'rspec-rails'
gem 'ruby-debug19', :require => 'ruby-debug'
gem 'hpricot', :require => false #html2haml
gem 'ruby_parser', :require => false # html2haml
gem 'pickle'
gem 'awesome_print', :require => 'ap'
gem 'factory_girl_rails'
end
group :development do
gem 'heroku', :require => false
gem 'sass'
end
group :test do
gem 'shoulda'
gem 'cucumber-rails'
gem 'spork', '~> 0.9.0.rc3'
gem 'guard-spork'
gem 'database_cleaner'
end
Install rvm
Create a gemset
Add a .rvmrc file to your RAILS_ROOT directory.
cd into your RAILS_ROOT directory.
Run bundle install.
I just removed the space in the volume name, I tried fixing the install script but I'd fix one area and it would error out in another.

Can't run Rails tests

I've reviewed the questions that seem to be relevant to my problem, and I can't find a solution. When I try to run the tests in a Rails 3.0.3 App, I get this error:
willmac:signalkit wbarrett$ rake test
(in /Users/wbarrett/Sites/signalkit)
LOADING CONFIG/ENVIRONMENT.RB
./test/unit/authentication_test.rb:3: uninitialized constant ActiveSupport (NameError)
from /Users/wbarrett/.rvm/gems/ree-1.8.7-2011.03#global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
from /Users/wbarrett/.rvm/gems/ree-1.8.7-2011.03#global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
from /Users/wbarrett/.rvm/gems/ree-1.8.7-2011.03#global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
from /Users/wbarrett/.rvm/gems/ree-1.8.7-2011.03#global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
./test/functional/authentications_controller_test.rb:3: uninitialized constant ActionController (NameError)
from /Users/wbarrett/.rvm/gems/ree-1.8.7-2011.03#global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
from /Users/wbarrett/.rvm/gems/ree-1.8.7-2011.03#global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
from /Users/wbarrett/.rvm/gems/ree-1.8.7-2011.03#global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
from /Users/wbarrett/.rvm/gems/ree-1.8.7-2011.03#global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
Errors running test:units, test:functionals!
As you can see, the tests are requiring test_helper and requiring environment.rb (I added the LOADING.. output to the top of the environment.rb config file)
Here's my Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'devise'
gem 'unicorn'
gem 'omniauth', :git => 'git://github.com/signalkit/omniauth.git', :branch => 'signalkit'
gem 'mongrel'
# gem 'tinder'
gem 'oauth2', :git => 'git://github.com/signalkit/oauth2.git', :branch => 'signalkit' #0.1.1 with modification for Basecamp
gem 'crack'
gem 'delayed_job'
gem "builder", "2.1.2"
gem "haml", "3.0.12"
gem "maruku", "0.6.0"
gem "RedCloth", "4.2.2"
gem "sinatra", "1.1.0", :require => "sinatra/base"
gem "monkeywrench"
gem "httparty"
gem "hoptoad_notifier"
group :test do
gem "shoulda", "~> 2.11.3"
gem "mocha", "~> 0.9.12"
gem "webmock", "= 0.7.3"
gem "test-unit"
end
What's wrong with this picture? Thanks all!
UPDATE: 6/30/2011 4:05PM CST
For whatever reason, changing the require at the top of all the test files from
require 'test_helper'
to
require File.dirname(__FILE__) + '/../test_helper'
solved my problem. +25 to whoever can tell me why this is, since the helper was being loaded fine the other way as well.

Rails [3.1.0.rc1] webrick freeze on http 500 error

since I installed rails 3.1.0, when some bugs occur, Webrick freezes for a couple of minutes when some bugs occur (not all bugs, apparently the 500 ones).
My gemfile looks like this:
source 'http://rubygems.org'
gem "rails", "3.1.0.rc1"
#Asset template engines
gem 'sass'
gem 'coffee-script'
gem 'uglifier'
gem 'jquery-rails'
gem "simple-navigation"
gem 'ranked-model' #, :git => 'git#github.com:harvesthq/ranked-model.git'
gem 'formtastic'
gem 'validation_reflection'
gem "paperclip", "~> 2.3"
gem 'devise'
gem 'heroku'
gem "aws-s3"
gem "scoped_search"
gem "meta_search", :git => 'git://github.com/ernie/meta_search.git'
gem "kaminari"
group :production do
gem "pg", "~> 0.11.0"
gem 'therubyracer-heroku', '0.8.1.pre3'
gem 'exception_notification', :require => 'exception_notifier'
end
group :development, :test do
gem 'mysql2'
end
require 'csv'
I'm on Mac OS X 10.6.7.
Can anyone help me on this? Thanks,
Nicolas
Try using mongrel, or another dev server such as unicorn.
Just add it to your gemfile
gem 'mongrel'

How do I fix this gem dependency problem in Rails 3 (bundler)?

For some reason, my project has messed up and now its throwing errors every time I try to run bundle install. Somem of the errors i've managed to fix by reordering the gems in my Gemfile, but now i'm getting this one:
Bundler could not find compatible versions for gem "faraday":
In Gemfile:
omniauth depends on
faraday (~> 0.7.3)
twitter depends on
faraday (0.6.1)
I thought that using bundler was supposed to erase dependency wtf's? I'm assumingn this message means that two gems want 2 different versions of faraday..?
How can I fix this problem though? Why doesn't it just install both versions, and each gem loads the version it wants?
I'd love some help on this please!
Thanks
Gemfile.lock:
https://gist.github.com/1061722
Gemfile:
# Edit this Gemfile to bundle your application's dependencies.
source 'http://rubygems.org'
gem 'rails', '3.0.9' #, :git => 'git://github.com/rails/rails.git'
gem "haml-rails"
gem "jquery-rails"
# Gem to abstract away the dplication common in standard restful controllers
gem 'inherited_resources'
# Allows us to keep an order of a user's items in their collection
gem "acts_as_list"
# Used to simplify user registrations and logins
# Pined to ref, as there is problem on devise HEAD
gem "devise", :git => "git://github.com/plataformatec/devise.git", :ref => '4964f53a42a3d434ee6d731d6f999d8dae13dada'
# Might not be used
gem "ajaxful_rating"
# Facilitates Edit-in-place functionality for certain data fields
gem "best_in_place", :git => 'git://github.com/moabite/best_in_place.git'
# Gem for uploading images. More flexible than "paperclip"
gem "carrierwave", :git => 'git://github.com/jnicklas/carrierwave.git'
gem "fog"
# Apparently needed to make the uploadify multifile uploader work
gem "flash_cookie_session"
# Used to that we can resize images uploaded through carrierwave, using
# ImageMagick
gem "rmagick"
# Easily create database models for site simulation
gem "factory_girl_rails"
# Useful for fake data generation
gem "faker"
gem "randexp"
gem "random_data"
gem 'forgery'
gem "lorempixum", :require => 'lorempixum'
gem "hashie"
# gem 'aws-s3', :require => 'aws/s3'
# gem 'bcrypt-ruby', :require => 'bcrypt'
# Provides a shorter syntax for building forms
gem 'formtastic'
# Sends notifications of errors on Production app
gem "hoptoad_notifier"
# Social Media Gems FB Connect, FB, and Twitter
gem "omniauth", :git => "git://github.com/intridea/omniauth.git" ,:ref => "b9fe79961ab56041dbf9"
gem "fb_graph"
gem "twitter"
gem 'rake', '0.8.7'
gem "jammit"
gem "rest-client"
gem 'rails-erd', :git => "git://github.com/voormedia/rails-erd.git"
gem "nokogiri"
group :development, :test do
gem "guard"
gem "guard-ego"
gem "guard-bundler"
gem "guard-jammit"
gem "guard-rails"
gem "guard-rspec"
gem "guard-shell"
gem "guard-compass"
gem "guard-livereload"
gem 'rb-fsevent', :require => false
gem "rb-inotify", :require => false
gem "libnotify", :require => false
# Needed to run html2haml to convert html to haml
gem "hpricot"
gem "taps"
gem "heroku"
#gem "heroku-rails", :git => "git://github.com/railsjedi/heroku-rails.git"
gem "heroku-rails", :git => "git://github.com/sid137/heroku-rails.git"
gem "sqlite3-ruby", :require => 'sqlite3'
gem "ruby-debug19", :require => 'ruby-debug'
# nice table displays in Rails console
gem "hirb"
gem "facebook_test_users", :git => "git://github.com/sid137/facebook_test_users.git"
# Allows us to push the local development database up to Heroku, and pull the
# heroku db down locally
gem "yaml_db"
gem "escape_utils"
# Sass and Blueprint based css framework for dev machine
# use "compass compile . " to compile css before deployment
gem "compass", ">=0.11.1"
# Print a header in app/model/*.rb files, listing the db columns present for
# each model
gem "selenium-webdriver"
gem "rack-test"
gem "capybara", :require => 'capybara/rspec'
gem "launchy"
gem 'database_cleaner', :git => 'git://github.com/bmabey/database_cleaner.git'
gem "rspec-core", "2.6.4"
gem "rspec-rails"# , '2.6.0' #, '2.5.0'
#gem 'shoulda-matchers', :git => 'git://github.com/thoughtbot/shoulda-matchers.git'
#gem 'shoulda-matchers', :git => 'git://github.com/sid137/shoulda-matchers.git'
gem "ZenTest"
gem "autotest-rails"
end
The specific version of Omniauth that you're using depends on Faraday ~> 0.7.3, while the latest released version of Twitter gem needs 0.6.
You can fix this by using the latest version of Twitter gem from the repository.
gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git'
I had the exact same issue and it got resolved by the following two lines in my Gemfile:
gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git'
gem 'omniauth', :git => "git://github.com/intridea/omniauth.git" ,:ref => "b9fe79961ab56041dbf9"
try deleting your Gemfile.lock (file) and then do
bundle install

Resources