A friend of mine programmed me a website years ago. Unfortunately from one day to the next the website did not work anymore.
I do not have Ruby on my computer (I never had it before either).
I am currently trying to host the Website again on Heroku via Github (https://github.com/dtricc/zoquant) and I get the following error:
See here
My Gemfile looks as follows:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '3.2.0'
gem 'rails', '~> 7.0.3'
gem 'pg', '>= 0.18', '< 2.0'
gem 'puma', '~> 6.0.2'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'webpacker'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'autoprefixer-rails'
gem 'font-awesome-sass', '~> 5.6.1'
gem 'simple_form'
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
My Gemfile.lock looks as follows:
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.2)
actionpack (= 5.2.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.3)
actionpack (= 7.0.3)
activejob (= 7.0.3)
activerecord (= 7.0.3)
activestorage (= 7.0.3)
activesupport (= 7.0.3)
mail (>= 2.7.1)
net-imap (>= 0)
net-pop (>= 0)
net-smtp (>= 0)
actiontext (7.0.3)
actionpack (= 7.0.3)
activerecord (= 7.0.3)
activestorage (= 7.0.3)
activesupport (= 7.0.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionmailer (5.2.2)
actionpack (= 5.2.2)
actionview (= 5.2.2)
activejob (= 5.2.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (7.0.3)
actionview (= 7.0.3)
activesupport (= 7.0.3)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (5.2.2)
activesupport (= 5.2.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.2)
activesupport (= 5.2.2)
globalid (>= 0.3.6)
activemodel (7.0.3)
activesupport (= 7.0.3)
activerecord (7.0.3)
activemodel (= 7.0.3)
activesupport (= 7.0.3)
activestorage (7.0.3)
actionpack (= 7.0.3)
activejob (= 7.0.3)
activerecord (= 7.0.3)
activesupport (= 7.0.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
arel (9.0.0)
autoprefixer-rails (9.4.10.2)
execjs
bindex (0.5.0)
bootsnap (1.4.1)
msgpack (~> 1.0)
builder (3.2.3)
byebug (11.0.0)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.5)
crass (1.0.4)
erubi (1.8.0)
execjs (2.7.0)
ffi (1.10.0)
font-awesome-sass (5.6.1)
sassc (>= 1.11)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
jbuilder (2.8.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
mimemagic (>= 0.3.2)
method_source (0.9.2)
mimemagic (0.4.2)
nokogiri (~> 1)
rake (>= 0)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
msgpack (1.2.9)
multi_json (1.13.1)
nio4r (2.3.1)
nokogiri (1.10.1)
mini_portile2 (~> 2.4.0)
pg (1.1.4)
puma (3.12.0)
rack (2.0.6)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (7.0.3)
actioncable (= 7.0.3)
actionmailbox (= 7.0.3)
actionmailer (= 7.0.3)
actionpack (= 7.0.3)
actiontext (= 7.0.3)
actionview (= 7.0.3)
activejob (= 7.0.3)
activemodel (= 7.0.3)
activerecord (= 7.0.3)
activestorage (= 7.0.3)
activesupport (= 7.0.3)
bundler (>= 1.15.0)
railties (= 7.0.3)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.2)
actionpack (= 5.2.2)
activesupport (= 5.2.2)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (12.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
ruby_dep (1.5.0)
sass (3.7.3)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassc (2.2.1)
ffi (~> 1.9)
rake
simple_form (4.1.0)
actionpack (>= 5.0)
activemodel (>= 5.0)
spring (2.0.2)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.9)
turbolinks (5.2.0)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
webpacker (4.0.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
autoprefixer-rails
bootsnap (>= 1.1.0)
byebug
coffee-rails (~> 4.2)
font-awesome-sass (~> 5.6.1)
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
pg (>= 0.18, < 2.0)
puma (~> 3.11)
rails (~> 5.2.2)
sass-rails (~> 5.0)
simple_form
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
webpacker
RUBY VERSION
ruby (~> 3.2.0)
I would appreciate any help!
Best Lorenzo
I already changed the versions of some of the packages (I obtained the error that the packages are to old and not supported by Heroku.
Looking into your commit history in your GitHub account, it feels like you tried to update the Ruby from 2.5.3 to 3.2.0 and the Ruby on Rails version from 5.2.2 to 7.0.3 in your project without doing any code changes.
Ruby 3.0 introduced some syntax changes. And upgrading two major versions of Ruby on Rails without having to change anything in the application, is usually not possible.
I advise reverting those changes and to restart the upgrade. But this time, only update in small incremental steps, following the suggestions from the official Rails Guides about upgrading.
Additionally, each Rails version supports or has preferred Ruby versions to run with. I suggest following the update path for Ruby and Ruby on Rails from this answer.
Related
I'm using OpenShift and trying to upload a simple application when I got this error:
Using kaminari (0.16.3)
Using mysql2 (0.3.16)
Using nested_form (0.3.2)
Installing nokogiri (1.6.6.2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/opt/rh/ruby200/root/usr/bin/ruby extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/rh/ruby200/root/usr/bin/ruby
--help
--clean
--use-system-libraries
/opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:53:in `require': cannot load such file -- mini_portile (LoadError)
from
/opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:53:in `require'
from extconf.rb:395:in `<main>'
Gem files will remain installed in /var/lib/openshift/XXYY/app-root/runtime/repo/vendor/bundle/ruby/gems/nokogiri-1.6.6.2 for inspection.
Results logged to /var/lib/openshift/XXYY/app-root/runtime/repo/vendor/bundle/ruby/gems/nokogiri-1.6.6.2/ext/nokogiri/gem_make.out
An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.
The gems that I added were:
gem 'rails_admin'
gem 'devise'
gem 'cancan'
gem 'paper_trail', '~> 4.0.0.rc'
gem 'seed_dump'
gem 'foundation-rails'
gem 'sass-rails', '~> 5.0.0'
I'm using Ruby 2.0 and rails 4.1.4 (from the quick start recipe). I tried to build the gem by hand by logging into the server, but I get the same error.
/opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:53:in require': cannot load such file -- mini_portile (LoadError)
from /opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:53:inrequire'
from extconf.rb:395:in `'
Is there any workaround (or solution) that I can make to avoid the building problem with nokogiri?
Added the Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.4)
actionpack (= 4.1.4)
actionview (= 4.1.4)
mail (~> 2.5.4)
actionpack (4.1.4)
actionview (= 4.1.4)
activesupport (= 4.1.4)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.4)
activesupport (= 4.1.4)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.4)
activesupport (= 4.1.4)
builder (~> 3.1)
activerecord (4.1.4)
activemodel (= 4.1.4)
activesupport (= 4.1.4)
arel (~> 5.0.0)
activesupport (4.1.4)
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)
bcrypt (3.1.10)
builder (3.2.2)
cancan (1.6.10)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.7.1)
devise (3.5.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
erubis (2.7.0)
execjs (2.2.1)
font-awesome-rails (4.3.0.0)
railties (>= 3.2, < 5.0)
foundation-rails (5.5.0.0)
railties (>= 3.1.0)
sass (>= 3.2.0, < 3.4)
haml (4.0.6)
tilt
i18n (0.7.0)
jbuilder (2.1.2)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.1)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5)
railties (>= 3.2.16)
json (1.8.3)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
minitest (5.8.0)
multi_json (1.11.2)
mysql2 (0.3.16)
nested_form (0.3.2)
nokogiri (1.6.6.2)
orm_adapter (0.5.0)
paper_trail (4.0.0.rc2)
activerecord (>= 3.0, < 6.0)
activesupport (>= 3.0, < 6.0)
request_store (~> 1.1)
polyglot (0.3.5)
rack (1.5.5)
rack-pjax (0.8.0)
nokogiri (~> 1.5)
rack (~> 1.1)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.4)
actionmailer (= 4.1.4)
actionpack (= 4.1.4)
actionview (= 4.1.4)
activemodel (= 4.1.4)
activerecord (= 4.1.4)
activesupport (= 4.1.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.4)
sprockets-rails (~> 2.0)
rails_admin (0.6.8)
builder (~> 3.1)
coffee-rails (~> 4.0)
font-awesome-rails (>= 3.0, < 5)
haml (~> 4.0)
jquery-rails (>= 3.0, < 5)
jquery-ui-rails (~> 5.0)
kaminari (~> 0.14)
nested_form (~> 0.3)
rack-pjax (~> 0.7)
rails (~> 4.0)
remotipart (~> 1.0)
safe_yaml (~> 1.0)
sass-rails (>= 4.0, < 6)
railties (4.1.4)
actionpack (= 4.1.4)
activesupport (= 4.1.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (0.9.6)
rdoc (4.2.0)
remotipart (1.2.1)
request_store (1.2.0)
responders (1.1.2)
railties (>= 3.2, < 4.2)
safe_yaml (1.0.4)
sass (3.3.14)
sass-rails (5.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
seed_dump (3.2.2)
activerecord (~> 4)
activesupport (~> 4)
spring (1.1.3)
sprockets (3.3.3)
rack (~> 1.0)
sprockets-rails (2.3.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.9)
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.5.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
warden (1.2.3)
rack (>= 1.0)
PLATFORMS
ruby
DEPENDENCIES
cancan
coffee-rails (~> 4.0.0)
devise
foundation-rails
jbuilder (~> 2.0)
jquery-rails
minitest
mysql2
paper_trail (~> 4.0.0.rc)
rails (= 4.1.4)
rails_admin
rake (~> 0.9.6)
sass-rails (~> 5.0.0)
sdoc (~> 0.4.0)
seed_dump
spring
sqlite3
thor
turbolinks
uglifier (>= 1.3.0)
BUNDLED WITH
1.10.6
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)
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.
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
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.