Ruby 2.0 is not a valid platform - ruby

Hi all I am working with Phusion Passenger and I go to run my web app and it gives me Ruby 2.0 is not a valid platform. Here is my output below, any ideas?
Thanks!
ruby_20` is not a valid platform. The available options are: [:ruby, :ruby_18, :ruby_19, :mri, :mri_18, :mri_19, :rbx, :jruby, :mswin, :mingw, :mingw_18, :mingw_19] (Bundler::DslError)
/usr/lib/ruby/vendor_ruby/bundler/dsl.rb:209:in `block in _normalize_options'
/usr/lib/ruby/vendor_ruby/bundler/dsl.rb:207:in `each'
/usr/lib/ruby/vendor_ruby/bundler/dsl.rb:207:in `_normalize_options'
/usr/lib/ruby/vendor_ruby/bundler/dsl.rb:56:in `gem'
/home/bistro/openproject/Gemfile:82:in `evaluate'
/usr/lib/ruby/vendor_ruby/bundler/dsl.rb:7:in `instance_eval'
/usr/lib/ruby/vendor_ruby/bundler/dsl.rb:7:in `evaluate'
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:17:in `build'
/usr/lib/ruby/vendor_ruby/bundler.rb:136:in `definition'
/usr/lib/ruby/vendor_ruby/bundler.rb:124:in `load'
/usr/lib/ruby/vendor_ruby/bundler.rb:107:in `setup'
/usr/lib/ruby/vendor_ruby/bundler/setup.rb:17:in `<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/var/lib/gems/1.9.1/gems/passenger-4.0.29/lib/phusion_passenger/loader_shared_helpers.rb:219:in `block in run_load_path_setup_code'
/var/lib/gems/1.9.1/gems/passenger-4.0.29/lib/phusion_passenger/loader_shared_helpers.rb:333:in `running_bundler'
/var/lib/gems/1.9.1/gems/passenger-4.0.29/lib/phusion_passenger/loader_shared_helpers.rb:217:in `run_load_path_setup_code'
/var/lib/gems/1.9.1/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:96:in `preload_app'
/var/lib/gems/1.9.1/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:153:in `<module:App>'
/var/lib/gems/1.9.1/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/var/lib/gems/1.9.1/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:28:in `<main>'
I have tried updating Ruby Gems, Updating Bundler, reinstalling Phusion - and I am not sure what else to do. Any thoughts?
Update 2:
I updated the Gem files in the Open project directory and still nothing.
It looks like Bundle updated now I am getting a different error:
Cannot execute "/var/lib/gems/1.9.1/gems/passenger-4.0.29/buildout/agents/SpawnPreparer": No such file or directory (errno=2) Application root /home/bistro/openproject Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV) production Ruby interpreter command /usr/bin/ruby1.9.1 User and groups Unknown Environment variables Unknown Ulimits Unknown

Related

trying to run command rails server (ruby on rails)

im trying to get started with rails. I have made a rails project and now im trying to start the server but get this.
C:\Users\Home\Documents\Sites\simple_cms>rails server
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `require': cannot load such file -- mysql2/2.2/mysql2 (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:134:in `require'
from C:/Users/Home/Documents/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
my gemfile has gem 'mysql2', '~> 0.3.18'
windows 7
ruby version 2.2.1
rails 4.2.1
mySql server version 5.6.24
Edit:
Couldn't find a solution that worked for me so i installed a different version of rails and it worked out.
Make sure you have installed mysql2 gem using bundle install and that bundle install has returned successful installation.
#James, This issue has been already raised so follow these links and hope this may help you.
1) Error "...cannot load such file -- mysql2/2.0/mysql2 (LoadError)". On Windows XP with Ruby 2.0.0
2) Ruby on Rails - cannot load such file -- mysql2/2.2/mysql2 (LoadError)
3) https://github.com/bundler/bundler/issues/3456
Try to change
gem 'mysql2', '~> 0.3.18'
to
gem 'mysql2', '~> 0.3.11'
I think that maximum compatible version with Windows is 0.3.11. Then run again bundle install

Jekyll build failed: Liquid Exception: cannot load such file -- yajl

Just recently skanked my PC, and I've not used Jekyll in a while, or indeed Ruby, however after thinking I'd set up everything correctly, when I try and run...
jekyll build or
jekyll serve
I get this error:
Generating... Liquid Exception: cannot load such file -- yajl/2.0/yajl i
n _posts/2013-09-21-welcome-to-jekyll.markdown
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require': c
annot load such file -- yajl/2.0/yajl (LoadError)
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
`require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib
/yajl/yajl.rb:2:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
`require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
`require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib
/yajl.rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:i
n `require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:i
n `rescue in require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:124:i
n `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.5.4/lib/pygments/
popen.rb:3:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:i
n `require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:i
n `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.5.4/lib/pygments.
rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in
`require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in
`require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/tags/hi
ghlight.rb:52:in `render_pygments'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/tags/hi
ghlight.rb:45:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:106:in `block in render_all'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:93:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:93:in `render_all'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:82:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/templat
e.rb:124:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/templat
e.rb:132:in `render!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/convert
ible.rb:88:in `render_liquid'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/convert
ible.rb:150:in `do_layout'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/post.rb
:259:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:241:in `block in render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:240:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:240:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:39:in `process'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/command
.rb:18:in `process_site'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/command
s/build.rb:23:in `build'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/command
s/build.rb:7:in `process'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/bin/jekyll:77:in `
block (2 levels) in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/c
ommand.rb:180:in `call'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/c
ommand.rb:180:in `call'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/c
ommand.rb:155:in `run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/r
unner.rb:402:in `run_active_command'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/r
unner.rb:66:in `run!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/d
elegates.rb:7:in `run!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/i
mport.rb:10:in `block in <top (required)>'
I think it's related to pygments.rb somehow. If i remove the first post that has the syntax highlighting demo, the build works. I've attemped to update pgyments to 0.5.4 but this seemed to make no different. I think got an error that pygments.rb is locked to 0.3.4:
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
You have requested:
pygments.rb ~> 0.5.4
The bundle currently has pygments.rb locked at 0.3.7.
Try running `bundle update pygments.rb`
Can anyone shed any light on this? It's driving me nuts. Running Ruby 2.0.0p353.
I did following
gem install rouge
and then
added following line in the _config.yml
highlighter: rouge
I found this solution from following page's last comment
https://github.com/jekyll/jekyll-help/issues/50
I encountered a similar problem today when trying to setup Octopress/Jekyll.
Here is the solution I found.
Step 1
Go to your ruby gems directory.
In my case it's located at C:/Ruby21/lib/ruby/gems/2.1.0/gems
Look for yajl.
You will see a folder called yajl-ruby-1.1.0-x86-mingw32
You may or may not see one called yajl-ruby-1.2.1
The one with a -ruby-1.1.0-x86-mingw32 tail is the default. And leads to the error.
What we want to use is the other version
Step 2
If you do not have the none mingw32 version, run
gem install yajl-ruby
This will install the latest version.
In my case the latest version was 1.2.1
Step 3
Change the default from the mingw32 version to the current version.
To do so, go to your website's gemfile.lock file
Find the line that says yajl-ruby (1.1.0-x86-mingw32)
and change it to yajl-ruby (1.2.1)
or the respective version you downloaded
Step 4
That's it. It should work now.
Yajl itself is a “small event-driven (SAX-style) JSON parser written in ANSI C.” You are supposed to install it on your Windows box (I’m not sure if there are binary downloads available, possibly you are to download sources and compile them with your preferred C compiler) before trying to install yajl-ruby gem, which is simply the binding to it.
Another option is to install Ruby development kit, refer to this manual for detailed explanation.

After upgrading to Mountain Lion don't work Rails app (Heroku + Git)

Today I upgraded from Snow Leopard to Mountain Lion and when I try to check my Rails app hosted on Heroku
heroku open
I will get this error message:
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: No such file or directory - git --version (Errno::ENOENT)
Backtrace: /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/helpers.rb:105:in ``'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/helpers.rb:105:in `has_git?'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/helpers.rb:110:in `git'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/command/base.rb:206:in `git_remotes'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/command/base.rb:179:in `extract_app_in_dir'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/command/base.rb:31:in `app'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/command/apps.rb:269:in `open'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/command.rb:193:in `run'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/lib/heroku/cli.rb:25:in `start'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.30.4/bin/heroku:16:in `<top (required)>'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `load'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `<main>'
Command: heroku open
Plugins: heroku-sql-console
Version: heroku-gem/2.30.4 (x86_64-darwin10.8.0) ruby/1.9.2
When I try to check the git:
git status
I'll get:
-bash: git: command not found
What happend? The upgrade to the new version of OS X remove Git and Heroku?
EDIT: Ok, so the problem about git solved the Hombrew installation. But then, when I run the app - rails s, I got:
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': dlopen(/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/rubyeventmachine.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib (LoadError)
Referenced from: /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/rubyeventmachine.bundle
Reason: image not found - /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/rubyeventmachine.bundle
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/eventmachine.rb:8:in `<top (required)>'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.5.0/lib/thin.rb:7:in `<top (required)>'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
from /Users/adam/rubydev/future_computers/config/application.rb:7:in `<top (required)>'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:53:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
from /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I also tried to add the mentioned gem in the statement - gem "eventmachine" - even if I don't use it in my app, but didn't help me. Still the same error message.
Could anyone help me, please, how to fix this issue?
Thanks you in advance
Go to Link and install homebrew and run
$ brew install git
It seems git is missing and you need it. Something must have broken on the transition - you will probably need to install it again and potentially rvm + ruby - but because they are stored in your home directory you should be ok. Just incase:
$ rvm get stable
$ rvm install 1.9.3
If your rails and heroku gems are missing you might need to download those again too.
The error seems to have come from installing git in system directory and it getting overwritten when you upgraded - go for homebrew so you are safe and it doesnt happen again.

Install passenger in CentOS with RVM and latest Ruby cause this error

I'm trying to install passenger-install-apache2-module but get this error:
[root#devserver redmine]# passenger-install-apache2-module
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'rails (= 3.2.6) ruby' in the gems available on this machine. (Bundler::GemNotFound)
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:161:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:128:in `block in resolve'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `catch'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `resolve'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/definition.rb:192:in `resolve'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/environment.rb:27:in `specs'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:60:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'
What I miss?
looks like passenger is in your Gemfile, you can fix it in few ways:
run bundle install
run NOEXEC=0 passenger-install-apache2-module
It seems not to be possible to run passenger-install-apache2-module in the Rails project folder. Go one folder up and try again. -Íris

no such file to load active_record/associations/has_and_belongs_to_many_association

I added the composite_primary_keys gem in my Gemfile. On local environment it runs fine, but on a centos machine it breaks with the following error. Ruby version is 1.9.2p290 and rubygems version is 1.3.7 on both environments. Does anyone know why that could be?
bundle exec rake db:create --trace
no such file to load -- active_record/associations/has_and_belongs_to_many_association
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/var/tmp/jenkins/gem_cache/myapp/gems/composite_primary_keys-4.1.2/lib/composite_primary_keys.rb:40:in `<top (required)>'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `require'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `each'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `block in require'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `each'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `require'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler.rb:122:in `require'
The same error can occur when trying to use the composite_primary_keys gem with Active Record 4.1.0:
.../vendor/cache/ruby/1.9.1/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require': cannot load such file -- active_record/associations/has_and_belongs_to_many_association (LoadError)
from .../vendor/cache/ruby/1.9.1/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
from .../vendor/cache/ruby/1.9.1/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
...
This is because the current release of composite_primary_keys (version 6.0.1 as of 17 April 2014) doesn't include support for Active Record 4.1.0, which apparently removed the file in question.
The problem is fixed in the ar_4.1.x branch of the gem's source code, however. If your project uses Bundler, a solution is to edit its Gemfile and replace the line
gem 'composite_primary_keys'
with
gem 'composite_primary_keys', {
:git => 'git://github.com/composite-primary-keys/composite_primary_keys.git',
:branch => 'ar_4.1.x'
}
then run bundle install from your project's root folder.
Cleaning the shared gems list on the jenkins machine fixed the issue.
Update your Gemfile:
gem 'composite_primary_keys', '~> 7.0'

Resources