Rails 3.1: Could not find generator foundation:install - ruby-on-rails-3.1

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

Related

What is the basic workflow for gems with Bundler and Heroku?

I have a Gemfile in the root of the app directory where I specify gems with versionnumber either like this:
gem 'rails', '3.2.14'
or in a environment block (where applicable) like this:
group :production do
gem 'pg', '0.12.2'
end
When I add a new gem I run the command
bundle install
and when I want to update all gems I run the comand
bundle update
When I deploy my app to Heroku I run
git push heroku master
Is there anything I'm missing here in the workflow, or could be improved? Because right now I'm getting an error on Heroku (after having updated all gems), stating the following
can't activate bcrypt-ruby (~> 3.0.0, runtime), already activated bcrypt-ruby-3.1.2. Make sure all dependencies are added to Gemfile. (Gem::LoadError)
And I cannot figure out what I'm doing wrong. The application works perfectly fine locally. Clarifications on what logical missteps I'm doing would be greatly appreciated.
Update
The Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.14)
actionpack (= 3.2.14)
mail (~> 2.5.4)
actionpack (3.2.14)
activemodel (= 3.2.14)
activesupport (= 3.2.14)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.14)
activesupport (= 3.2.14)
builder (~> 3.0.0)
activerecord (3.2.14)
activemodel (= 3.2.14)
activesupport (= 3.2.14)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.14)
activemodel (= 3.2.14)
activesupport (= 3.2.14)
activesupport (3.2.14)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
arel (3.0.2)
bcrypt-ruby (3.1.2)
builder (3.0.4)
daemons (1.1.9)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (2.0.1)
hike (1.2.3)
hirb (0.7.1)
httpclient (2.3.4.1)
i18n (0.6.5)
impressionist (1.4.7)
httpclient (~> 2.2)
nokogiri (~> 1.6.0)
journey (1.0.4)
jquery-rails (2.2.1)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (4.0.4)
jquery-rails
railties (>= 3.1.0)
json (1.8.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25)
mini_portile (0.5.1)
multi_json (1.7.9)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
pg (0.12.2)
polyglot (0.3.3)
quiet_assets (1.0.2)
railties (>= 3.1, < 5.0)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.14)
actionmailer (= 3.2.14)
actionpack (= 3.2.14)
activerecord (= 3.2.14)
activeresource (= 3.2.14)
activesupport (= 3.2.14)
bundler (~> 1.0)
railties (= 3.2.14)
railties (3.2.14)
actionpack (= 3.2.14)
activesupport (= 3.2.14)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
sass (3.2.10)
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)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.18.1)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
uglifier (2.2.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
webrick (1.3.1)
PLATFORMS
ruby
DEPENDENCIES
bcrypt-ruby (= 3.1.2)
hirb
impressionist
jquery-rails (= 2.2.1)
jquery-ui-rails
pg (= 0.12.2)
quiet_assets
rails (= 3.2.14)
sass-rails (~> 3.2.6)
sqlite3 (= 1.3.7)
thin
uglifier (>= 1.3.0)
webrick (~> 1.3.1)

NokoGiri Error trying to use MiniTest-Rails-capybara

when trying to run
rake minitest:features
for the first time in my rails 3 app on my osx 10.8.4 machine i get a nokogiri error
/Users/willbarker/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': dlopen(/Users/willbarker/.rvm/gems/ruby-2.0.0-p195/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle, 9): Library not loaded:
/Users/willbarker/.bundler/tmp/60826/gems/nokogiri-1.6.0/ports/i686-apple-darwin11/libxml2/2.8.0/lib/libxml2.2.dylib (LoadError)
Referenced from: /Users/willbarker/.rvm/gems/ruby-2.0.0-p195/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle
Reason: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0
Is there a way to resolve that? Is it an issue with the gem or my underlying system?(which seems to find a way to trip over nokogiri faily often)
UPDATE - The lock file
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.13)
actionpack (= 3.2.13)
mail (~> 2.5.3)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
active_admin_editor (1.1.0)
activeadmin (>= 0.4.0)
ejs
rails (>= 3.0.0)
activeadmin (0.6.0)
arbre (>= 1.0.1)
bourbon (>= 1.0.0)
devise (>= 1.1.2)
fastercsv
formtastic (>= 2.0.0)
inherited_resources (>= 1.3.1)
jquery-rails (>= 1.0.0)
kaminari (>= 0.13.0)
meta_search (>= 0.9.2)
rails (>= 3.0.0)
sass (>= 3.1.0)
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)
activeresource (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
arbre (1.0.1)
activesupport (>= 3.0.0)
arel (3.0.2)
bcrypt-ruby (3.1.1)
better_errors (0.9.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bourbon (3.1.8)
sass (>= 3.2.0)
thor
builder (3.0.4)
callsite (0.0.11)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
chunky_png (1.2.8)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.1)
climate_control (>= 0.0.3, < 1.0)
coderay (1.0.9)
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.6.3)
compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
compass-rails (1.0.3)
compass (>= 0.12.2, < 0.14)
daemons (1.1.9)
debug_inspector (0.0.2)
devise (3.0.0)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
warden (~> 1.2.3)
ejs (1.1.1)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (1.4.0)
multi_json (~> 1.0)
fastercsv (1.5.5)
formtastic (2.2.1)
actionpack (>= 3.0)
fssm (0.2.10)
has_scope (0.5.1)
hashie (1.2.0)
high_voltage (1.2.4)
hike (1.2.3)
httparty (0.11.0)
multi_json (~> 1.0)
multi_xml (>= 0.5.2)
i18n (0.6.1)
inherited_resources (1.4.0)
has_scope (~> 0.5.0)
responders (~> 0.9)
journey (1.0.4)
jquery-rails (2.3.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.0)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
meta_request (0.2.7)
callsite
rack-contrib
railties
meta_search (1.1.3)
actionpack (~> 3.1)
activerecord (~> 3.1)
activesupport (~> 3.1)
polyamorous (~> 0.5.0)
mime-types (1.23)
mini_portile (0.5.1)
minitest (4.7.5)
minitest-capybara (0.4.1)
capybara (~> 2.0)
minitest (~> 4.0)
rake
minitest-metadata (0.4.0)
minitest (~> 4.7)
minitest-rails (0.9.2)
minitest (~> 4.7)
rails (>= 3.0)
minitest-rails-capybara (0.10.0)
capybara (~> 2.0)
minitest-capybara (~> 0.4)
minitest-metadata (~> 0.4)
minitest-rails (~> 0.9.1)
multi_json (1.7.7)
multi_xml (0.5.4)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
orm_adapter (0.4.0)
paperclip (3.5.0)
activemodel (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (~> 0.5.0)
mime-types
pg (0.16.0)
polyamorous (0.5.0)
activerecord (~> 3.0)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-contrib (1.1.0)
rack (>= 0.9.1)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.13)
actionmailer (= 3.2.13)
actionpack (= 3.2.13)
activerecord (= 3.2.13)
activeresource (= 3.2.13)
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.2.13)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.1.0)
rb_wunderground (0.1.2)
hashie (~> 1.2)
httparty (~> 0.9)
json (~> 1.7)
rdoc (3.12.2)
json (~> 1.4)
responders (0.9.3)
railties (~> 3.1)
sass (3.2.9)
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)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.18.1)
tilt (1.4.1)
treetop (1.4.14)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
uglifier (2.1.2)
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
active_admin_editor
activeadmin
better_errors
binding_of_caller
coffee-rails (~> 3.2.1)
compass-rails
high_voltage
jquery-rails (= 2.3.0)
meta_request
minitest-rails
minitest-rails-capybara
paperclip (~> 3.0)
pg
rails (= 3.2.13)
rb_wunderground
sass-rails (~> 3.2.3)
thin
uglifier (>= 1.0.3)
zurb-foundation
You need to upgrade libxml2 and libxslt. If you are using Brew you can do the following:
$ brew install libxml2 libxslt
$ brew link libxml2 libxslt
See the Nokogiri documentation for more information.

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

Running Metrical with 1.9 Hash Syntax

I want to use Metrical with my brand-new Rails project using Ruby 1.9 hash syntax doing things like
before_filter :guest_user, only: [:new, :create]
before_filter :correct_user, only: :destroy
and I get this error:
/Users/xxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/racc/parser.rb:351:in `on_error': (Racc::ParseError)
parse error on value ":" (tCOLON)
I did a bit of investigation and found out that the ruby_parser gem does not support 1.9 hash syntax (see github issue) - not knowing which version that refers to I've tried to update the ruby_parser gem to 2.3.1 which doesn't work because some of the code quality tools included in metrical require 2.0 versions of ruby_parser.
Is there any way to solve this (besides rolling back to the old syntax)? I'm also a bit puzzled because a couple of the code quality tools seem rather outdated, checking on RubyToolBox confirmed this impression. Or am I missing something fundamental here?
(Here's my Gemfile.lock for reference):
GEM
remote: https://rubygems.org/
specs:
Saikuro (1.1.0)
actionmailer (3.2.6)
actionpack (= 3.2.6)
mail (~> 2.4.4)
actionpack (3.2.6)
activemodel (= 3.2.6)
activesupport (= 3.2.6)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.3)
activemodel (3.2.6)
activesupport (= 3.2.6)
builder (~> 3.0.0)
activerecord (3.2.6)
activemodel (= 3.2.6)
activesupport (= 3.2.6)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.6)
activemodel (= 3.2.6)
activesupport (= 3.2.6)
activesupport (3.2.6)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.8)
arel (3.0.2)
arrayfields (4.7.4)
awesome_print (1.0.2)
bcrypt-ruby (3.0.1)
bootstrap-sass (2.0.4.0)
bootstrap-will_paginate (0.0.7)
will_paginate
builder (3.0.0)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.4)
ffi (~> 1.0, >= 1.0.6)
chronic (0.3.0)
churn (0.0.13)
chronic (>= 0.2.3)
hirb
json_pure
main
ruby_parser (~> 2.0.4)
sexp_processor (~> 3.0.3)
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.3.3)
colored (1.2)
cucumber (1.2.1)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.0)
json (>= 1.4.6)
cucumber-rails (1.3.0)
capybara (>= 1.1.2)
cucumber (>= 1.1.8)
nokogiri (>= 1.5.0)
database_cleaner (0.7.2)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (3.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (3.5.0)
factory_girl (~> 3.5.0)
railties (>= 3.0.0)
faker (1.0.1)
i18n (~> 0.4)
fattr (2.2.1)
ffi (1.1.0)
flay (1.4.3)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
flog (2.5.3)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
gherkin (2.11.1)
json (>= 1.4.6)
growl (1.0.3)
guard (1.2.3)
listen (>= 0.4.2)
thor (>= 0.14.6)
guard-rspec (1.2.0)
guard (>= 1.1)
guard-spork (1.1.0)
guard (>= 1.1)
spork (>= 0.8.4)
hike (1.2.1)
hirb (0.7.0)
i18n (0.6.0)
journey (1.0.4)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.7.3)
json_pure (1.7.3)
launchy (2.1.0)
addressable (~> 2.2.6)
libwebsocket (0.1.4)
addressable
listen (0.4.7)
rb-fchange (~> 0.0.5)
rb-fsevent (~> 0.9.1)
rb-inotify (~> 0.8.8)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
main (4.7.1)
map (6.2.0)
metric_fu (2.1.1)
Saikuro (>= 1.1.0)
activesupport (>= 2.0.0)
chronic (~> 0.3.0)
churn (>= 0.0.7)
flay (>= 1.2.1)
flog (>= 2.3.0)
rails_best_practices (>= 0.6.4)
rcov (>= 0.8.3.3)
reek (>= 1.2.6)
roodi (>= 2.1.0)
syntax
metrical (0.1.0)
metric_fu (~> 2.1.1)
rcov (~> 0.9)
mime-types (1.19)
multi_json (1.3.6)
nokogiri (1.5.5)
pg (0.14.0)
polyglot (0.3.3)
progressbar (0.11.0)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.6)
actionmailer (= 3.2.6)
actionpack (= 3.2.6)
activerecord (= 3.2.6)
activeresource (= 3.2.6)
activesupport (= 3.2.6)
bundler (~> 1.0)
railties (= 3.2.6)
rails_best_practices (1.10.1)
activesupport
awesome_print
colored
erubis
i18n
progressbar
sexp_processor
railties (3.2.6)
actionpack (= 3.2.6)
activesupport (= 3.2.6)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
rb-fchange (0.0.5)
ffi
rb-fsevent (0.9.1)
rb-inotify (0.8.8)
ffi (>= 0.5.0)
rcov (0.9.11)
rdoc (3.12)
json (~> 1.4)
reek (1.2.12)
ripper_ruby_parser (~> 0.0.7)
ruby2ruby (~> 1.2.5)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ripper_ruby_parser (0.0.8)
sexp_processor (~> 3.0)
roodi (2.1.0)
ruby_parser
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.11.1)
rspec-rails (2.11.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.11.0)
ruby2ruby (1.2.5)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ruby_parser (2.0.6)
sexp_processor (~> 3.0)
rubyzip (0.9.9)
sass (3.1.20)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.25.0)
childprocess (>= 0.2.5)
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
sexp_processor (3.0.10)
simplecov (0.6.4)
multi_json (~> 1.0)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
spork (0.9.2)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
syntax (1.0.0)
thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)
uglifier (1.2.6)
execjs (>= 0.3.0)
multi_json (~> 1.3)
will_paginate (3.0.3)
xpath (0.1.4)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
arrayfields
bcrypt-ruby
bootstrap-sass
bootstrap-will_paginate
capybara
coffee-rails
cucumber-rails
database_cleaner
factory_girl_rails
faker
fattr
growl
guard-rspec
guard-spork
jquery-rails
launchy
map
metrical
pg
rails (= 3.2.6)
rb-fsevent
rspec-rails
sass-rails
simplecov
spork
sqlite3
uglifier
will_paginate
After doing some more research on this issue and under the impression that ruby_parser wouldn't be updated for a while (watching https://github.com/seattlerb/ruby_parser though) I've decided to finally go for the nasty hack to replace my ruby hashes with the old syntax. I wrote a rake task for that such that it's easy to replace them all in one run, run metrical and then revert them back to their nice 1.9 hash syntax.
https://github.com/bkleinen/hash-reverter
Update: apparently, ruby_parser will be updated with version 3.0.0, but most of the tools depend on older versions.

Resources