Rubygems Loading Wrong Version of Gem - ruby

I'm working on a Gem.
Despite specifying the version of activemodel, the gem is actually using activemodel 4.0.0.
As of 4.0.0 the constructor only takes a single argument. So when I try and pass in a second argument I get an Argument error:
/Users/me/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-4.0.0/lib/active_record/core.rb:180:in `initialize': wrong number of arguments (2 for 1) (ArgumentError)
Why is Rubygems using the wrong version of ActiveModel?
I have specified the following dependencies in the gemspec:
gem.add_dependency "log4r"
gem.add_dependency "deep_end"
gem.add_dependency "google_drive"
gem.add_development_dependency 'rake'
gem.add_development_dependency 'rspec'
gem.add_development_dependency "activemodel", "3.2.13"
gem.add_development_dependency "activerecord", "3.2.13"
gem.add_development_dependency "activesupport", "3.2.13"
My Gemfile.lock looks like this:
PATH
remote: .
specs:
drive_time (0.0.1)
deep_end
google_drive
log4r
GEM
remote: https://rubygems.org/
specs:
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
activerecord (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.4)
deep_end (0.0.1)
log4r
diff-lcs (1.2.4)
faraday (0.8.7)
multipart-post (~> 1.1)
google_drive (0.3.6)
nokogiri (>= 1.4.4, != 1.5.2, != 1.5.1)
oauth (>= 0.3.6)
oauth2 (>= 0.5.0)
httpauth (0.2.0)
i18n (0.6.1)
jwt (0.1.8)
multi_json (>= 1.5)
log4r (1.1.10)
mini_portile (0.5.0)
multi_json (1.7.7)
multi_xml (0.5.4)
multipart-post (1.2.0)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
oauth (0.4.7)
oauth2 (0.9.2)
faraday (~> 0.8)
httpauth (~> 0.2)
jwt (~> 0.1.4)
multi_json (~> 1.0)
multi_xml (~> 0.5)
rack (~> 1.2)
rack (1.5.2)
rake (10.1.0)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
tzinfo (0.3.37)
PLATFORMS
ruby
DEPENDENCIES
activerecord (= 3.2.13)
activesupport (= 3.2.13)
drive_time!
rake
rspec
I also get the following:
$ bundle show activemodel #/Users/pedr/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activemodel-3.2.13

Make sure you are running your code with bundle exec, otherwise ruby will default to using the most recent version of the gem you have installed.
Using bundle exec will disallow loading of any gems not in your bundle and should correct your problem. Check out the manpage for more details.
Hope this helps!

After trying everything I could think of, the following has done the trick (though whether it has permanently cured the issue, only time will tell).
$ gem clean
Uninstall rbenv
Install rbenv
Delete Gemfile.lock
$ bundle

Related

Could not find i18n-0.6.9 in any of the sources

Actually i'm getting that error inside the travis build.
My Gemfile is:
source 'http://rubygems.org'
# Gemfile for youtube_dlhelper
# Add dependencies required to use your gem here.
group :default do
gem 'highline'
gem 'dir'
gem 'fileutils2'
gem 'parseconfig'
gem 'viddl-rb'
gem 'streamio-ffmpeg'
gem 'rainbow'
gem 'gli'
end
# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
group :development do
gem 'rdoc', '~> 4.1.0'
gem 'bundler', '~> 1.0'
gem 'jeweler', '~> 2.0.0'
gem 'yard'
gem 'gem-release'
end
group :test do
gem 'shoulda', '>= 0'
gem 'rspec'
gem 'coveralls', require: false
gem 'simplecov'
end
The Gemfile.lock:
GEM
remote: http://rubygems.org/
specs:
activesupport (4.0.2)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.3.5)
atomic (1.1.14)
builder (3.2.2)
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
descendants_tracker (0.0.3)
diff-lcs (1.2.5)
dir (0.1.2)
docile (1.1.1)
domain_name (0.5.15)
unf (>= 0.0.5, < 1.0.0)
faraday (0.8.8)
multipart-post (~> 1.2.0)
fileutils2 (0.2.0)
gem-release (0.7.1)
git (1.2.6)
github_api (0.11.1)
addressable (~> 2.3)
descendants_tracker (~> 0.0.1)
faraday (~> 0.8, < 0.10)
hashie (>= 1.2)
multi_json (>= 1.7.5, < 2.0)
nokogiri (~> 1.6.0)
oauth2
gli (2.8.1)
hashie (2.0.5)
highline (1.6.20)
http-cookie (1.0.2)
domain_name (~> 0.5)
httpauth (0.2.0)
i18n (0.6.9)
jeweler (2.0.0)
builder
bundler (>= 1.0)
git (>= 1.2.5)
github_api
highline (>= 1.6.15)
nokogiri (>= 1.5.10)
rake
rdoc
json (1.8.1)
jwt (0.1.8)
multi_json (>= 1.5)
mechanize (2.7.3)
domain_name (~> 0.5, >= 0.5.1)
http-cookie (~> 1.0)
mime-types (~> 2.0)
net-http-digest_auth (~> 1.1, >= 1.1.1)
net-http-persistent (~> 2.5, >= 2.5.2)
nokogiri (~> 1.4)
ntlm-http (~> 0.1, >= 0.1.1)
webrobots (>= 0.0.9, < 0.2)
mime-types (2.0)
mini_portile (0.5.2)
minitest (4.7.5)
multi_json (1.8.2)
multi_xml (0.5.5)
multipart-post (1.2.0)
net-http-digest_auth (1.4)
net-http-persistent (2.9)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
ntlm-http (0.1.1)
oauth2 (0.9.2)
faraday (~> 0.8)
httpauth (~> 0.2)
jwt (~> 0.1.4)
multi_json (~> 1.0)
multi_xml (~> 0.5)
rack (~> 1.2)
parseconfig (1.0.4)
progressbar (0.21.0)
rack (1.5.2)
rainbow (1.99.1)
rake (10.1.1)
rdoc (4.1.0)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
shoulda-context (1.1.6)
shoulda-matchers (2.4.0)
activesupport (>= 3.0.0)
simplecov (0.8.2)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
streamio-ffmpeg (1.0.0)
term-ansicolor (1.2.2)
tins (~> 0.8)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tins (0.13.1)
tzinfo (0.3.38)
unf (0.1.3)
unf_ext
unf_ext (0.0.6)
viddl-rb (0.79)
mechanize
nokogiri
progressbar
webrobots (0.1.1)
yard (0.8.7.3)
PLATFORMS
ruby
DEPENDENCIES
bundler (~> 1.0)
coveralls
dir
fileutils2
gem-release
gli
highline
jeweler (~> 2.0.0)
parseconfig
rainbow
rdoc (~> 4.1.0)
rspec
shoulda
simplecov
streamio-ffmpeg
viddl-rb
yard
I searched inside Stackoverflow and found mostly the answer to make a bundle install or remove the lock and bundle install again.
Also i tried out to use bundle install -deployment but that one uses all dependencies, and my *.gem is ~60M big (by using rake release).
Is there a better solution?
I've found the solution. The problem was, that i have overwritten the install section of .travis.yml. So bundle install aren't executed and it doesn't found it.
So the fix:
from
install:
- sudo apt-get install ubuntu-restricted-extras ffmpeg
to
before_install:
- sudo apt-get install ubuntu-restricted-extras ffmpeg

Error while deploying Ruby Application into Stackato

I am deploying Rack based ruby Application in stackato. Because of local network i have downloaded all my gems locally when i try to push after some stagging i am getting the following error.
Fetching missing gems from RubyGems
staging: http://production.s3.rubygems.org/gems/bundler-1.2.1.gem:
staging: 2013-12-13 01:36:21 ERROR 504: Host production.s3.rubygems.org lookup
failed: Host not found.
staging: wget failed to fetch http://production.s3.rubygems.org/gems/bundler-1.2.1.gem
staging: /home/stackato/stackato/vcap/staging/lib/vcap/staging/plug/gemfile_task.rb:134:in `block in install_gems': Failed fetching missing gems from RubyGems (RuntimeError)
Failed to stage application:
staging plugin exited with non-zero exit code
i thought it is a Gateway error but when i go through my gem list i found
bundler (1.2.1)
if i run bundle install --local --deployment and bundle package it is successfully running the bundle. i have an rbenv here rather than rvm i tried to install bundler at global.
I don't know why it is hitting that host.
Killing my time since three days.
Help me please Thanks in advance
Update
Gemfile:
source 'http://rubygems.org'
source 'http://gemserver.portal.sb.net'
gem 'sinatra'
gem 'grape','0.6.0'
gem 'rack-fiber_pool'
gem 'haml'
gem 'hashie'
gem 'idp-utilities', require: %w(idp/test_utils/string idp/middleware/idp_url idp/logging)
gem 'idp-clients', '~> 0.1.8', require: %W(idp/middleware/clients idp/content/client idp/user/client idp/session/client idp/authentication/client idp/exceptions idp/user/exceptions)
gem "newrelic_rpm", "~> 3.6.8.168"
group :test do
gem 'page_object'
gem 'cucumber', '1.2.5'
gem 'rspec'
gem 'watir-webdriver'
gem 'childprocess'
gem 'waitforit'
gem 'httparty'
gem 'rack-test'
gem 'mirage', '3.0.0.alpha.15', require: 'mirage/client'
gem 'simplecov'
gem 'idp-user_service_mocks'
gem 'idp-content_service_mock'
end
group :development do
gem 'rake'
gem 'shotgun'
gem 'thin'
gem 'sinatra-contrib'
gem 'sinatra-reloader'
end
and my Gemfile.lock is
GEM
remote: http://rubygems.org/
remote: http://gemserver.portal.sb.net/
specs:
activesupport (4.0.1)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.3.5)
akami (1.2.0)
gyoku (>= 0.4.0)
nokogiri (>= 1.4.0)
atomic (1.1.14)
axiom-types (0.0.5)
descendants_tracker (~> 0.0.1)
ice_nine (~> 0.9)
backports (3.3.5)
builder (3.2.2)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
coercible (0.2.0)
backports (~> 3.0, >= 3.1.0)
descendants_tracker (~> 0.0.1)
cookiejar (0.3.0)
cucumber (1.2.5)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.7)
multi_json (~> 1.3)
daemons (1.1.9)
descendants_tracker (0.0.3)
diff-lcs (1.2.4)
em-http-request (1.1.1)
addressable (>= 2.3.4)
cookiejar
em-socksify (>= 0.3)
eventmachine (>= 1.0.3)
http_parser.rb (>= 0.6.0.beta.2)
em-socksify (0.3.0)
eventmachine (>= 1.0.0.beta.4)
em-synchrony (1.0.3)
eventmachine (>= 1.0.0.beta.1)
equalizer (0.0.7)
eventmachine (1.0.3)
faraday (0.8.8)
multipart-post (~> 1.2.0)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
ffi (1.9.3)
gherkin (2.11.8)
multi_json (~> 1.3)
grape (0.6.0)
activesupport
builder
hashie (>= 1.2.0)
multi_json (>= 1.3.2)
multi_xml (>= 0.5.2)
rack (>= 1.3.0)
rack-accept
rack-mount
virtus
gyoku (1.0.0)
builder (>= 2.1.2)
haml (4.0.4)
tilt
hashie (2.0.5)
hike (1.2.3)
http_parser.rb (0.6.0.beta.2)
httparty (0.12.0)
json (~> 1.8)
multi_xml (>= 0.5.2)
httpi (2.0.2)
rack
i18n (0.6.5)
ice_nine (0.10.0)
idp-clients (0.1.8.455)
activesupport
em-http-request
em-synchrony
faraday
faraday_middleware
savon (= 2.2.0)
idp-content_service_mock (0.0.1.495)
mirage (>= 3.0.0.alpha.10)
idp-user_service_mocks (0.1.3.460)
em-synchrony
eventmachine
idp-utilities (3.1.1.269)
childprocess
grape
net-ssh-gateway
sprockets
waitforit
watir-webdriver
json (1.8.1)
mini_portile (0.5.2)
minitest (4.7.5)
mirage (3.0.0.alpha.15)
childprocess
haml
hashie
httparty
ptools
sinatra
thor
waitforit
multi_json (1.8.2)
multi_xml (0.5.5)
multipart-post (1.2.0)
net-ssh (2.7.0)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
newrelic_rpm (3.6.8.168)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
nori (2.1.0)
page_object (2.2.0.15)
watir-webdriver
watir-webdriver
ptools (1.2.2)
rack (1.5.2)
rack-accept (0.4.5)
rack (>= 0.4)
rack-fiber_pool (0.9.3)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-protection (1.5.1)
rack
rack-test (0.6.2)
rack (>= 1.0)
rake (10.0.4)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
rubyzip (1.0.0)
savon (2.2.0)
akami (~> 1.2.0)
builder (>= 2.1.2)
gyoku (~> 1.0.0)
httpi (~> 2.0.2)
nokogiri (>= 1.4.0)
nori (~> 2.1.0)
wasabi (~> 3.1.0)
selenium-webdriver (2.37.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip (~> 1.0.0)
websocket (~> 1.0.4)
shotgun (0.9)
rack (>= 1.0)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
sinatra (1.4.4)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
sinatra-contrib (1.4.0)
backports (>= 2.0)
eventmachine
rack-protection
rack-test
sinatra (~> 1.4.2)
tilt (~> 1.3)
sinatra-reloader (1.0)
sinatra-contrib
sprockets (2.10.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
tzinfo (0.3.38)
virtus (1.0.0)
axiom-types (~> 0.0.5)
coercible (~> 0.2)
descendants_tracker (~> 0.0.1)
equalizer (~> 0.0.7)
waitforit (0.0.1)
wasabi (3.1.0)
httpi (~> 2.0)
nokogiri (>= 1.4.0)
watir-webdriver (0.6.4)
selenium-webdriver (>= 2.18.0)
websocket (1.0.7)
PLATFORMS
ruby
DEPENDENCIES
childprocess
cucumber (= 1.2.5)
grape (= 0.6.0)
haml
hashie
httparty
idp-clients (~> 0.1.8)
idp-content_service_mock
idp-user_service_mocks
idp-utilities
mirage (= 3.0.0.alpha.15)
newrelic_rpm (~> 3.6.8.168)
page_object
rack-fiber_pool
rack-test
rake
rspec
shotgun
simplecov
sinatra
sinatra-contrib
sinatra-reloader
thin
waitforit
watir-webdriver
My Stackato.yml is
name: weblogin
instances: 1
framework:
type: rack
mem: 128
env:
RACK_ENV: preprod

Rails 3.1: Could not find generator foundation:install

Rails is unable to find the generator foundation:install. It is very strange.
Attempting to run the foundation:install generator:
macbook$ rails g foundation:install
Could not find generator foundation:install.
Listing the available generators: macbook$ rails g --help
Usage: rails generate GENERATOR [args] [options]
General options:
-h, [--help] # Print generator's options and usage
-p, [--pretend] # Run but do not make any changes
-f, [--force] # Overwrite files that already exist
-s, [--skip] # Skip files that already exist
-q, [--quiet] # Suppress status output
Please choose a generator below.
Rails:
assets
controller
generator
helper
integration_test
mailer
migration
model
observer
performance_test
plugin
resource
scaffold
scaffold_controller
session_migration
ActiveRecord:
active_record:devise
Coffee:
coffee:assets
Devise:
devise
devise:install
devise:views
FactoryGirl:
factory_girl:model
Gmaps4rails:
gmaps4rails:install
Jquery:
jquery:install
Js:
js:assets
Mongoid:
mongoid:devise
NestedForm:
nested_form:install
Rspec:
rspec:install
TestUnit:
test_unit:controller
test_unit:helper
test_unit:integration
test_unit:mailer
test_unit:model
test_unit:observer
test_unit:performance
test_unit:plugin
test_unit:scaffold
Huh. No Foundation listed.
Previously I had added 'zurb-foundation' to my gemfile:
source 'http://rubygems.org'
gem 'rails', '3.1.1'
gem 'rake', '10.0.3'
gem 'sqlite3'
gem 'gmaps4rails', '1.4.8'
gem 'devise'
gem 'nested_form'
gem 'timezone'
gem 'rspec-rails', :group => [:test, :development]
group :test do
gem 'rb-fsevent'
gem 'factory_girl_rails'
gem 'capybara'
gem 'guard-rspec'
end
group :assets do
gem 'sass', '>= 3.2.0'
gem 'sass-rails', '>= 3.1.4'
gem 'coffee-rails', '>= 3.1.1'
gem 'uglifier', '>= 1.0.3'
gem 'zurb-foundation', '> 4.0.0'
end
gem 'jquery-rails'
Then I ran bundle install:
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Using rake (10.0.3)
Using multi_json (1.7.9)
Using activesupport (3.1.1)
Using builder (3.0.4)
Using i18n (0.6.5)
Using activemodel (3.1.1)
Using erubis (2.7.0)
Using rack (1.3.10)
Using rack-cache (1.2)
Using rack-mount (0.8.3)
Using rack-test (0.6.2)
Using hike (1.2.3)
Using tilt (1.3.7)
Using sprockets (2.0.4)
Using actionpack (3.1.1)
Using mime-types (1.24)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.3.3)
Using actionmailer (3.1.1)
Using arel (2.2.3)
Using tzinfo (0.3.37)
Using activerecord (3.1.1)
Using activeresource (3.1.1)
Using ansi (1.4.3)
Using bcrypt-ruby (3.1.2)
Using bundler (1.2.3)
Using mini_portile (0.5.1)
Using nokogiri (1.6.0)
Using xpath (2.0.0)
Using capybara (2.1.0)
Using coderay (1.0.9)
Using coffee-script-source (1.6.3)
Using execjs (2.0.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Using json (1.8.0)
Using rdoc (3.12.2)
Using thor (0.14.6)
Using railties (3.1.1)
Using coffee-rails (3.1.1)
Using columnize (0.3.6)
Using debugger-linecache (1.2.0)
Using debugger-ruby_core_source (1.2.3)
Using debugger (1.6.1)
Using orm_adapter (0.4.0)
Using warden (1.2.3)
Using devise (2.2.7)
Using diff-lcs (1.2.4)
Using factory_girl (4.2.0)
Using factory_girl_rails (4.2.1)
Using ffi (1.9.0)
Using formatador (0.2.4)
Using gmaps4rails (1.4.8)
Using rb-fsevent (0.9.3)
Using rb-inotify (0.9.1)
Using rb-kqueue (0.2.0)
Using listen (1.3.0)
Using lumberjack (1.0.4)
Using method_source (0.8.2)
Using slop (3.4.6)
Using pry (0.9.12.2)
Using guard (1.8.2)
Using rspec-core (2.14.5)
Using rspec-expectations (2.14.2)
Using rspec-mocks (2.14.3)
Using rspec (2.14.1)
Using guard-rspec (3.0.2)
Using jquery-rails (3.0.4)
Using nested_form (0.3.2)
Using rails (3.1.1)
Using rspec-rails (2.14.0)
Using sass (3.2.10)
Using sass-rails (3.1.7)
Using sqlite3 (1.3.8)
Using timezone (0.2.1)
Using turn (0.9.6)
Using uglifier (2.2.0)
Using zurb-foundation (4.3.1)
Your bundle is complete! It was installed into ./devise
And my Gemfile.lock looks like this:
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.1)
actionpack (= 3.1.1)
mail (~> 2.3.0)
actionpack (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.2)
activemodel (3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
activesupport (3.1.1)
multi_json (~> 1.0)
ansi (1.4.3)
arel (2.2.3)
bcrypt-ruby (3.1.2)
builder (3.0.4)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
coderay (1.0.9)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
columnize (0.3.6)
debugger (1.6.1)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.2.3)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.3)
devise (2.2.7)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
diff-lcs (1.2.4)
erubis (2.7.0)
execjs (2.0.0)
factory_girl (4.2.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.2.1)
factory_girl (~> 4.2.0)
railties (>= 3.0.0)
ffi (1.9.0)
formatador (0.2.4)
gmaps4rails (1.4.8)
json
guard (1.8.2)
formatador (>= 0.2.4)
listen (>= 1.0.0)
lumberjack (>= 1.0.2)
pry (>= 0.9.10)
thor (>= 0.14.6)
guard-rspec (3.0.2)
guard (>= 1.8)
rspec (~> 2.13)
hike (1.2.3)
i18n (0.6.5)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.0)
listen (1.3.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
lumberjack (1.0.4)
mail (2.3.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.2)
mime-types (1.24)
mini_portile (0.5.1)
multi_json (1.7.9)
nested_form (0.3.2)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
orm_adapter (0.4.0)
polyglot (0.3.3)
pry (0.9.12.2)
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.4)
rack (1.3.10)
rack-cache (1.2)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.1.1)
actionmailer (= 3.1.1)
actionpack (= 3.1.1)
activerecord (= 3.1.1)
activeresource (= 3.1.1)
activesupport (= 3.1.1)
bundler (~> 1.0)
railties (= 3.1.1)
railties (3.1.1)
actionpack (= 3.1.1)
activesupport (= 3.1.1)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (10.0.3)
rb-fsevent (0.9.3)
rb-inotify (0.9.1)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
rdoc (3.12.2)
json (~> 1.4)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.5)
rspec-expectations (2.14.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.3)
rspec-rails (2.14.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
sass (3.2.10)
sass-rails (3.1.7)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (>= 3.1.10)
tilt (~> 1.3.2)
slop (3.4.6)
sprockets (2.0.4)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.8)
thor (0.14.6)
tilt (1.3.7)
timezone (0.2.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turn (0.9.6)
ansi
tzinfo (0.3.37)
uglifier (2.2.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
warden (1.2.3)
rack (>= 1.0)
xpath (2.0.0)
nokogiri (~> 1.3)
zurb-foundation (4.3.1)
sass (>= 3.2.0)
PLATFORMS
ruby
DEPENDENCIES
capybara
coffee-rails (>= 3.1.1)
debugger
devise
factory_girl_rails
gmaps4rails (= 1.4.8)
guard-rspec
jquery-rails
nested_form
rails (= 3.1.1)
rake (= 10.0.3)
rb-fsevent
rspec-rails
sass (>= 3.2.0)
sass-rails (>= 3.1.4)
sqlite3
timezone
turn
uglifier (>= 1.0.3)
zurb-foundation (> 4.0.0)
I've tried redoing it from scratch with the same results.
Totally stuck. Any ideas?
Okay. Solved. Problem of my own making.
I have RVM on this machine. In my .rvmrc file, I was forcing Rails to version 3.1.1 which was messing with bundler and breaking things. Clear that file, problems evaporate.
smacks head

activerecord-jdbc-adapter requires ActiveRecord at runtime error

So i just updated the JRUBY to 1.7.3 [1.9] and did a fresh gem install for the 1.9 version of ruby.
Here are the versions of my activerecord gems:
activerecord (1.6.0)
activerecord-jdbc-adapter (1.2.9)
ActiveRecord-JDBC (0.5)
activesupport (3.2.13)
When i try to execute a database statement i get the following error
activerecord-jdbc-adapter requires ActiveRecord at runtime
no such file to load -- active_record/version (LoadError)
anyone know what's going on? I have verified by using jgem list that these gems are all installed
Gemfile.lock
GEM
remote: http://rubygems.org/
specs:
ActiveRecord-JDBC (0.5)
Ascii85 (1.0.2)
activerecord (1.6.0)
activerecord-jdbc-adapter (1.2.9)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
afm (0.2.0)
akami (1.2.0)
gyoku (>= 0.4.0)
nokogiri (>= 1.4.0)
bouncy-castle-java (1.5.0147)
builder (3.2.0)
business_time (0.6.1)
activesupport (>= 3.1.0)
tzinfo (~> 0.3.31)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
cucumber (1.2.3)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.6)
multi_json (~> 1.3)
cuke_sniffer (0.0.3)
roxml
data_magic (0.14)
faker (>= 1.1.2)
yml_reader (>= 0.2)
diff-lcs (1.2.1)
faker (1.1.2)
i18n (~> 0.5)
ffi (1.6.0)
gherkin (2.11.6-java)
json (>= 1.7.6)
gyoku (1.0.0)
builder (>= 2.1.2)
hashery (2.1.0)
httpi (2.0.2)
rack
i18n (0.6.1)
jruby-openssl (0.8.7)
bouncy-castle-java (>= 1.5.0147)
jruby-win32ole (0.8.5)
json (1.7.7-java)
mime-types (1.21)
multi_json (1.7.2)
nokogiri (1.5.9-java)
nori (2.0.4)
page-object (0.8.6.1)
page_navigation (>= 0.7)
selenium-webdriver (>= 2.31.0)
watir-webdriver (>= 0.6.2)
page_navigation (0.7)
data_magic (>= 0.14)
pdf-reader (1.3.2)
Ascii85 (~> 1.0.0)
afm (~> 0.2.0)
hashery (~> 2.0)
ruby-rc4
ttfunk
rack (1.5.2)
rake (10.0.4)
rautomation (0.8.0)
ffi
rest-client (1.6.7)
mime-types (>= 1.16)
roxml (3.3.1)
activesupport (>= 2.3.0)
nokogiri (>= 1.3.3)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0)
ruby-debug-ide (0.4.16)
rake (>= 0.8.1)
ruby-ole (1.2.11.6)
ruby-rc4 (0.1.5)
rubyzip (0.9.9)
savon (2.1.0)
akami (~> 1.2.0)
builder (>= 2.1.2)
gyoku (~> 1.0.0)
httpi (~> 2.0.2)
nokogiri (>= 1.4.0)
nori (~> 2.0.3)
wasabi (~> 3.0.0)
selenium-webdriver (2.31.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
sources (0.0.1)
spreadsheet (0.8.3)
ruby-ole (>= 1.0)
ttfunk (1.0.3)
tzinfo (0.3.37)
wasabi (3.0.0)
httpi (~> 2.0)
nokogiri (>= 1.4.0)
watir-webdriver (0.6.2)
selenium-webdriver (>= 2.18.0)
websocket (1.0.7)
xpath (1.0.0)
nokogiri (~> 1.3)
yml_reader (0.2)
PLATFORMS
java
DEPENDENCIES
ActiveRecord-JDBC
activerecord
activerecord-jdbc-adapter
builder
business_time
childprocess
cucumber
cuke_sniffer
ffi
gherkin
jruby-openssl
jruby-win32ole
json
mime-types
nokogiri
page-object
pdf-reader
rake
rautomation
rest-client
rspec
ruby-debug-ide
rubyzip
savon
selenium-webdriver
sources
spreadsheet
watir-webdriver
xpath
The first issue was your require statement,
Your second issue was using 1.6.0 which has been reported to throw this error. The solution is to remove AR 1.6.0 from your Gemfile.lock and install a newer version.
In your Gemfile add:
gem "activerecord", "~> 3.2.13"
then re-run bundler after fixing your Gemfile.lock

MAC OSX: Ruby on Rails and MongoDB Configuration

This may have been asked somewhere else but I either couldn't find it or the solution didn't help me.
I successfully installed Homebrew, RVM, Ruby on Rails and mongoDB.
I followed these instructions http://mongoid.org/en/mongoid/docs/installation.html when installing mongoid but when I ran
rails g mongoid:config it said it could not find the generator.
So I ran rails g and it wasn't in the list. I checked my gem.lock file and it wasn't in there either. I manually put it in there but still no results.
When I ran bundle install on the project it wasn't there either. I tried installing it in my main directory and in the project directory to no avail.
Any direction would be greatly appreciated as I am new to this.
EDIT: My gem.lock file:
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.11)
actionpack (= 3.2.11)
mail (~> 2.4.4)
actionpack (3.2.11)
activemodel (= 3.2.11)
activesupport (= 3.2.11)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.11)
activesupport (= 3.2.11)
builder (~> 3.0.0)
activerecord (3.2.11)
activemodel (= 3.2.11)
activesupport (= 3.2.11)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.11)
activemodel (= 3.2.11)
activesupport (= 3.2.11)
activesupport (3.2.11)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.4)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.4.0)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.2.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.7.6)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.19)
multi_json (1.5.0)
polyglot (0.3.3)
rack (1.4.4)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.11)
actionmailer (= 3.2.11)
actionpack (= 3.2.11)
activerecord (= 3.2.11)
activeresource (= 3.2.11)
activesupport (= 3.2.11)
bundler (~> 1.0)
railties (= 3.2.11)
railties (3.2.11)
actionpack (= 3.2.11)
activesupport (= 3.2.11)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.3)
rdoc (3.12)
json (~> 1.4)
sass (3.2.5)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.7)
thor (0.17.0)
tilt (1.3.3)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.35)
uglifier (1.3.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
PLATFORMS
ruby
DEPENDENCIES
coffee-rails (~> 3.2.1)
jquery-rails
rails (= 3.2.11)
sass-rails (~> 3.2.3)
sqlite3
uglifier (>= 1.0.3)
EDIT: Sorry here's my GEmfile:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
As per instructions, add
gem "mongoid", "~> 3.0.0"
to your Gemfile to use Mongoid 3, and then
bundle install
Make sure that bundle install succeeds, check Gemfile.lock for mongoid, then
rails g mongoid:config

Resources