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.
Related
My trusty array search methods decided to break after a bundle install update.
My old way:
def all_find_and_click(type,data)
...
all(type).each do |elem|
...
elem.click if elem.text == data
...
end
end
Gets me this....
NoMethodError:
undefined method `each' for #<RSpec::Matchers::BuiltIn::All:0x3c416e8>
# ./spec/features/capy_support.rb:25:in `all_find_and_click'
https://github.com/jnicklas/capybara
still shows all('a').each as a finding technique
all('a').each { |a| a[:href] }
Here is my Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.1)
actionpack (= 4.1.1)
actionview (= 4.1.1)
mail (~> 2.5.4)
actionpack (4.1.1)
actionview (= 4.1.1)
activesupport (= 4.1.1)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.1)
activesupport (= 4.1.1)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.1)
activesupport (= 4.1.1)
builder (~> 3.1)
activerecord (4.1.1)
activemodel (= 4.1.1)
activesupport (= 4.1.1)
arel (~> 5.0.0)
activesupport (4.1.1)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
builder (3.2.2)
capybara (2.3.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
childprocess (0.5.3)
ffi (~> 1.0, >= 1.0.11)
cucumber (1.3.15)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.1)
cucumber-rails (1.4.1)
capybara (>= 1.1.2, < 3)
cucumber (>= 1.3.8, < 2)
mime-types (~> 1.16)
nokogiri (~> 1.5)
rails (>= 3, < 5)
diff-lcs (1.2.5)
erubis (2.7.0)
ffi (1.9.3-x86-mingw32)
gherkin (2.12.2-x86-mingw32)
multi_json (~> 1.3)
hike (1.2.3)
i18n (0.6.9)
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
mini_portile (0.6.0)
minitest (5.3.4)
multi_json (1.10.1)
multi_test (0.1.1)
nokogiri (1.6.2.1-x86-mingw32)
mini_portile (= 0.6.0)
polyglot (0.3.5)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.1)
actionmailer (= 4.1.1)
actionpack (= 4.1.1)
actionview (= 4.1.1)
activemodel (= 4.1.1)
activerecord (= 4.1.1)
activesupport (= 4.1.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.1)
sprockets-rails (~> 2.0)
railties (4.1.1)
actionpack (= 4.1.1)
activesupport (= 4.1.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-core (3.0.1)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.1)
rspec-support (~> 3.0.0)
rspec-rails (3.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-support (~> 3.0.0)
rspec-support (3.0.0)
rubyzip (1.1.4)
selenium-webdriver (2.42.0)
childprocess (>= 0.5.0)
multi_json (~> 1.0)
rubyzip (~> 1.0)
websocket (~> 1.0.4)
sprockets (2.12.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (1.2.1)
thread_safe (~> 0.1)
websocket (1.0.7)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
x86-mingw32
DEPENDENCIES
capybara
cucumber
cucumber-rails
rails
rspec
rspec-rails
selenium-webdriver
Any ideas?
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)
I am working on a rails 3.1.10 application and have the following error when I execute "rake assets:precompile RAILS_ENV=production"
rake version is 10.1.0 and I can execute rake db:reset without an error.
Many thank in advance
/Users/username/.rvm/rubies/ruby-1.9.2-p320/bin/ruby /Users/username/.rvm/gems/ruby-1.9.2-p320/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Application has been already initialized.
/Users/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.10/lib/rails/application.rb:95:in `initialize!'
/Users/username/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.1.10/lib/sprockets/assets.rake:91:in `block (2 levels) in <top (required)>'
/Users/username/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.1.10/lib/sprockets/assets.rake:56:in `block (3 levels) in <top (required)>'
Tasks: TOP => assets:precompile:primary => assets:environment
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/Users/username/.rvm/rubies/ruby-1.9.2-p320/...]
/Users/username/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.1.10/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/username/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.1.10/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/username/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.1.10/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/username/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `eval'
/Users/username/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
Gemfile.lock
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.10)
actionpack (= 3.1.10)
mail (~> 2.3.3)
actionpack (3.1.10)
activemodel (= 3.1.10)
activesupport (= 3.1.10)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.6)
rack-cache (~> 1.2)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.4)
activemodel (3.1.10)
activesupport (= 3.1.10)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.10)
activemodel (= 3.1.10)
activesupport (= 3.1.10)
arel (~> 2.2.3)
tzinfo (~> 0.3.29)
activerecord-import (0.3.1)
activerecord (~> 3.0)
activerecord (~> 3.0)
activeresource (3.1.10)
activemodel (= 3.1.10)
activesupport (= 3.1.10)
activesupport (3.1.10)
multi_json (>= 1.0, < 1.3)
ansi (1.4.3)
arel (2.2.3)
attr_required (0.0.5)
aws-s3 (0.6.3)
builder
mime-types
xml-simple
aws-sdk (1.11.1)
json (~> 1.4)
nokogiri (>= 1.4.4)
uuidtools (~> 2.1)
bcrypt-ruby (3.1.0)
better_errors (0.9.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.0.4)
callsite (0.0.11)
capybara (1.0.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 0.2.0)
xpath (~> 0.1.4)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
cloudfront-signer (2.1.0)
cocaine (0.3.2)
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)
daemons (1.1.9)
dalli (2.6.4)
debug_inspector (0.0.2)
delayed_job (3.0.5)
activesupport (~> 3.0)
delayed_job_active_record (0.4.4)
activerecord (>= 2.1.0, < 4)
delayed_job (~> 3.0)
diff-lcs (1.2.4)
erubis (2.7.0)
eventmachine (1.0.3)
exception_notification (4.0.0)
actionmailer (>= 3.0.4)
activesupport (>= 3.0.4)
execjs (1.4.0)
multi_json (~> 1.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)
faraday (0.8.7)
multipart-post (~> 1.1)
fb_graph (2.6.0)
httpclient (>= 2.2.0.2)
multi_json
rack-oauth2 (>= 0.14.4)
tzinfo
ffi (1.9.0)
formatador (0.2.4)
guard (1.8.1)
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)
hashie (2.0.5)
hike (1.2.3)
httpauth (0.2.0)
httpclient (2.3.3)
i18n (0.6.4)
jpmobile (2.0.11)
jquery-rails (3.0.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.0)
json_pure (1.8.0)
jsonschema (2.0.2)
jwt (0.1.6)
multi_json (>= 1.0)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.8.0)
listen (1.2.2)
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)
meta_request (0.2.7)
callsite
rack-contrib
railties
method_source (0.8.1)
mime-types (1.23)
mini_portile (0.5.1)
multi_json (1.2.0)
multipart-post (1.2.0)
newrelic_rpm (3.6.5.130)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
oauth2 (0.8.1)
faraday (~> 0.8)
httpauth (~> 0.1)
jwt (~> 0.1.4)
multi_json (~> 1.0)
rack (~> 1.2)
omniauth (1.1.4)
hashie (>= 1.2, < 3)
rack
omniauth-facebook (1.4.1)
omniauth-oauth2 (~> 1.1.0)
omniauth-oauth2 (1.1.1)
oauth2 (~> 0.8.0)
omniauth (~> 1.0)
paperclip (3.0.2)
activemodel (>= 3.0.0)
activerecord (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (>= 0.0.2)
mime-types
paypal_adaptive (0.3.6)
json (~> 1.0)
jsonschema (~> 2.0.0)
pg (0.15.1)
pg_search (0.7.0)
activerecord (>= 3.1)
activesupport (>= 3.1)
arel
polyglot (0.3.3)
pry (0.9.12.2)
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.4)
pusher (0.11.3)
multi_json (~> 1.0)
signature (~> 0.1.6)
rack (1.3.10)
rack-cache (1.2)
rack (>= 0.4)
rack-contrib (1.1.0)
rack (>= 0.9.1)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-oauth2 (0.14.8)
activesupport (>= 2.3)
attr_required (>= 0.0.5)
httpclient (>= 2.2.0.2)
i18n
json (>= 1.4.3)
rack (>= 1.1)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.1.10)
actionmailer (= 3.1.10)
actionpack (= 3.1.10)
activerecord (= 3.1.10)
activeresource (= 3.1.10)
activesupport (= 3.1.10)
bundler (~> 1.0)
railties (= 3.1.10)
railties (3.1.10)
actionpack (= 3.1.10)
activesupport (= 3.1.10)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
raindrops (0.11.0)
rake (10.1.0)
rb-fsevent (0.9.3)
rb-inotify (0.9.0)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
rdoc (3.12.2)
json (~> 1.4)
rspec (2.14.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.2)
rspec-expectations (2.14.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.1)
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)
rubyzip (0.9.9)
sass (3.2.9)
sass-rails (3.1.7)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (>= 3.1.10)
tilt (~> 1.3.2)
selenium-webdriver (0.2.2)
childprocess (>= 0.1.9)
ffi (>= 1.0.7)
json_pure
rubyzip
signature (0.1.7)
slop (3.4.5)
sprockets (2.0.4)
hike (~> 1.2)
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.14.6)
tilt (1.3.7)
treetop (1.4.14)
polyglot
polyglot (>= 0.3.1)
turn (0.8.2)
ansi (>= 1.2.2)
tzinfo (0.3.37)
uglifier (2.1.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
unicorn (4.6.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
uuidtools (2.1.4)
xml-simple (1.1.2)
xpath (0.1.4)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
activerecord-import
aws-s3
aws-sdk
bcrypt-ruby
better_errors
binding_of_caller
capybara (= 1.0.0)
cloudfront-signer
cocaine (= 0.3.2)
coffee-rails (~> 3.1.1)
dalli
delayed_job_active_record
exception_notification (~> 4.0.0.rc1)
factory_girl_rails
fb_graph
guard-rspec
jpmobile (~> 2.0.5)
jquery-rails
kaminari
meta_request
newrelic_rpm
omniauth
omniauth-facebook
paperclip (= 3.0.2)
paypal_adaptive
pg
pg_search
pusher
rails (= 3.1.10)
rake
rb-fsevent (~> 0.9)
rspec-rails
sass-rails (~> 3.1.5)
thin
turn (= 0.8.2)
uglifier (>= 1.0.3)
unicorn
I'm trying to deploy a jruby rails app using the neo4j gem to Heroku. Running locally works fine but when I hit #new (//new) at Heroku's end, I get:
NoMethodError (undefined method `reference_node' for nil:NilClass):
After [some research][1], it seemed like my Neo4j server wasn't even running.
So I had to do
heroku run rails console
then
Neo4j.start
..in order to get my app working. But why doesn't Neo4j know to just wake up and start?
This is my Gemfile.lock:
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)
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)
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.6.2)
diff-lcs (1.2.4)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
hike (1.2.2)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.2.1)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.7.7-java)
mail (2.5.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.23)
multi_json (1.7.2)
neo4j (2.2.3-java)
activemodel (>= 3.0.0, < 3.3)
neo4j-wrapper (= 2.2.3)
orm_adapter (>= 0.0.3)
railties (>= 3.0.0, < 3.3)
neo4j-community (1.8.1-java)
neo4j-core (2.2.3-java)
neo4j-community (>= 1.8.1, < 1.9)
neo4j-cypher (~> 1.0.0)
neo4j-cypher (1.0.0)
neo4j-wrapper (2.2.3-java)
neo4j-core (= 2.2.3)
orm_adapter (0.4.0)
polyglot (0.3.3)
puma (1.6.3-java)
rack (~> 1.2)
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.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.0.4)
rdoc (3.12.2)
json (~> 1.4)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
rspec-rails (2.13.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
sass (3.2.8)
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)
therubyrhino (2.0.2)
therubyrhino_jar (>= 1.7.3)
therubyrhino_jar (1.7.4)
thor (0.18.1)
tilt (1.3.7)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
uglifier (2.0.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
PLATFORMS
java
DEPENDENCIES
coffee-rails (~> 3.2.1)
jquery-rails
neo4j (>= 2.2.3)
puma
rails (= 3.2.13)
rspec-rails
sass-rails (~> 3.2.3)
therubyrhino
uglifier (>= 1.0.3)
This is most likely because Neo4j start-up is not (yet) thread-safe. Neo4j will actually start up the first time you hit your app. However, depending on the type of request(s), you could encounter the error described above from that point forward. Specifically, multiple requests to the app while Neo4j is starting up will result in errors until the app is restarted.
I submitted a fix for this (see here, here, and here) and it has been merged. However, it has not yet been included in an official gem release yet.
If you want to work around this issue for now, you have two options:
-Point to the neo4-core master branch
-Auto-start Neo4j on startup using the following monkey patch. This skirts around the thread-safety issue, because Rails won't accept any requests until Neo4j finishes starting up.
#config/initializers/neo4j.rb
require 'neo4j'
module Neo4j
class Railtie < ::Rails::Railtie
initializer "neo4j.db.start", :after => "neo4j.start" do |app|
Neo4j.start if app.config.neo4j.auto_start
end
end
end
#config/application.rb
config.neo4j.auto_start = true
Note that even with these fixes in place, I've still had trouble with the puma web server throwing strange exceptions. I would recommend torquebox-lite for production use - it's never fallen over for me.
UPDATE: Neo4j.rb v2.2.4 (released on May 19, 2013) includes this fix, so this patch will no longer be necessary after you upgrade.
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.