I have installed ruby 2.1.1 using rvm after root login. In another user login ruby 1.8.7 is in use. with 1.8.7 Redmine 2.5.0 works fine. but with 2.1.0
command:
ruby script/rails server webrick -d -e production
error:
/usr/local/rvm/gems/ruby-2.1.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:252:in `require': /usr/local/rvm/gems/ruby-2.1.1/gems/vpim-0.695/lib/vpim/vcard.rb:679: invalid multibyte escape: /^\xFE\xFF/ (SyntaxError)
invalid multibyte escape: /^\xFF\xFE/
from /usr/local/rvm/gems/ruby-2.1.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:252:in `block in require'
from /usr/local/rvm/gems/ruby-2.1.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:237:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.1.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:252:in `require'
from /usr/local/rvm/gems/ruby-2.1.1/gems/vpim-0.695/lib/vpim.rb:12:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
from /home/dax/redmine-2.5.0/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.1/gems/railties-3.2.17/lib/rails/commands.rb:53:in `require'
from /usr/local/rvm/gems/ruby-2.1.1/gems/railties-3.2.17/lib/rails/commands.rb:53:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-2.1.1/gems/railties-3.2.17/lib/rails/commands.rb:50:in `tap'
from /usr/local/rvm/gems/ruby-2.1.1/gems/railties-3.2.17/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Try to remove the gem vpim with this command:
gem uninstall vpim
I've tried an installation and don't need this gem.
If you really need that gem edit the file
/usr/local/rvm/gems/ruby-2.1.1/gems/vpim-0.695/lib/vpim/vcard.rb
and place this in the first line:
# encoding: US-ASCII
The vpim gem mentioned in your stack trace is not a requirement of core Redmine. It seems you have a custom plugin which requires that gem and which is not compatible with newer Ruby versions (i.e. anything >= 1.9).
To solve this issue, you thus need to update or remove that custom plugin. Also, right now, it is probably a good idea to not use Ruby 2.1 but Ruby 2.0 as it seems that Redmine core (or more generally, Rails 3.2) still has other issues with Ruby 2.1.1.
Related
Using jekyll, I get the following error when run command bundle exec jekyll serve --watch,
bundler: failed to load command: jekyll (/home/admin/.rbenv/versions/2.3.8/bin/jekyll)
NameError: uninitialized constant Syck
/home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/safe_yaml-0.9.7/lib/safe_yaml/syck_node_monkeypatch.rb:42:in `<top (required)>'
/home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/safe_yaml-0.9.7/lib/safe_yaml.rb:200:in `require'
/home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/safe_yaml-0.9.7/lib/safe_yaml.rb:200:in `<module:YAML>'
/home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/safe_yaml-0.9.7/lib/safe_yaml.rb:132:in `<top (required)>'
/home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/jekyll-1.3.0/lib/jekyll.rb:21:in `require'
/home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/jekyll-1.3.0/lib/jekyll.rb:21:in `<top (required)>'
/home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/jekyll-1.3.0/bin/jekyll:7:in `require'
/home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/jekyll-1.3.0/bin/jekyll:7:in `<top (required)>'
/home/admin/.rbenv/versions/2.3.8/bin/jekyll:22:in `load'
/home/admin/.rbenv/versions/2.3.8/bin/jekyll:22:in `<top (required)>'
/home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/commander-4.1.6/lib/commander/runner.rb:385:in `block in require_program': program version required (Commander::Runner::CommandError)
from /home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/commander-4.1.6/lib/commander/runner.rb:384:in `each'
from /home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/commander-4.1.6/lib/commander/runner.rb:384:in `require_program'
from /home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/commander-4.1.6/lib/commander/runner.rb:52:in `run!'
from /home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/commander-4.1.6/lib/commander/delegates.rb:8:in `run!'
from /home/admin/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/commander-4.1.6/lib/commander/import.rb:10:in `block in <top (required)>'
I guess that the few line relating to jekyll-1.3.0 tells us that there is a path problem somewhere.
To update your gems with bundle update
and do a rehash with rbenv rehash
It looks like you're using Jekyll version 1.3.0, which is about 5 years old at this point. Syck was removed from Ruby 2.0.0, so I think you'll need to use a newer version of Jekyll or use the Syck gem to bridge the gap. https://github.com/ruby/syck
I'm usally running my specs from inside IntelliJ. I've deleted my gems and reinstalled them using bundle install (due to another error) and now I'm getting an error when trying to run the specs.
I've noticed that running the specs from intelliJ it uses:
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
which isn't the case when running from the shell (I placed a print inside the kernel_require script check it).
Also I've see that the ruby version from intelliJ is:
"ruby 2.2.4: 230"
and from shell:
ruby -e 'print "ruby #{ RUBY_VERSION }p#{ RUBY_PATCHLEVEL }"'
ruby 2.2.6p396%
The error:
/home/user/.rvm/rubies/ruby-2.2.4/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/user/.rvm/gems/ruby-2.2.4/bin/rspec /home/user/workspace/auto-test/spec/pools/pool_cg_view_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter
Testing started at 10:21 ...
/home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': incompatible library version - /home/user/.rvm/gems/ruby-2.2.4/gems/nokogiri-1.6.8/lib/nokogiri/nokogiri.so (LoadError)
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/gems/ruby-2.2.4/gems/nokogiri-1.6.8/lib/nokogiri.rb:32:in `rescue in <top (required)>'
from /home/user/.rvm/gems/ruby-2.2.4/gems/nokogiri-1.6.8/lib/nokogiri.rb:28:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/gems/ruby-2.2.4/gems/capybara-2.7.1/lib/capybara.rb:3:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/gems/ruby-2.2.4/gems/capybara-2.7.1/lib/capybara/dsl.rb:2:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/gems/ruby-2.2.4/gems/capybara-2.7.1/lib/capybara/rspec.rb:2:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /home/user/workspace/auto-test/spec/support/capybara.rb:3:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/workspace/auto-test/spec/spec_helper.rb:6:in `block in <top (required)>'
from /home/user/workspace/auto-test/spec/spec_helper.rb:6:in `each'
from /home/user/workspace/auto-test/spec/spec_helper.rb:6:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1295:in `block in requires='
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1295:in `each'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1295:in `requires='
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration_options.rb:109:in `block in process_options_into'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration_options.rb:108:in `each'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration_options.rb:108:in `process_options_into'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration_options.rb:21:in `configure'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:101:in `setup'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:88:in `run'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:73:in `run'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:41:in `invoke'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/exe/rspec:4:in `<top (required)>'
from /home/user/.rvm/gems/ruby-2.2.4/bin/rspec:23:in `load'
from /home/user/.rvm/gems/ruby-2.2.4/bin/rspec:23:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
If I try to run the specs from shell it will work, no errors, so I guess the problem is related to the configuration of the run but not sure what.
The run configuration which worked until now:
I've tried to remove the nokogiri gem and reinstall it, but still the same.
Any ideas?
project structure:
You are pointing out that you are in ruby 2.2.6 when using the console. IntelliJ is complaining about missing the nokogiri gem.
I can imagine that probably your last bundle install did not use ruby 2.2.4 (as used by IntelliJ) but ruby 2.2.6 to install the gems.
I recommend the following steps to narrow this down:
verify and ensure that you are using ruby 2.2.4 on the shell (this is very important!)
run bundle install to ensure all gems of your project are installed for ruby 2.2.4
run your specs in the shell
If this succeeds then try running specs with IntelliJ.
This should work in case the steps described above went fine.
A personal note (not knowing if it's already the case):
In my projects I always have a .ruby-version file in the root of my project to ensure the correct ruby version for the current project. You may even go a step further and add a .ruby-gemset file.
More information can be found in the rvm docs
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
I tried to getting started with chef so I installed the chef gem on my laptop ( OS : OSX 10.8) with ruby 2.0.0-p0 but when I try to "knife configure " I juste get this message :
/Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:106:in `require': cannot load such file -- rubygems/format (LoadError)
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:106:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/provider/package/rubygems.rb:34:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/providers.rb:60:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef.rb:25:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chefspec-0.9.0/lib/chefspec.rb:1:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chefspec-0.9.0/lib/chef/knife/cookbook_create_specs.rb:1:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife/core/subcommand_loader.rb:37:in `load'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife/core/subcommand_loader.rb:37:in `block in load_commands'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife/core/subcommand_loader.rb:37:in `each'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife/core/subcommand_loader.rb:37:in `load_commands'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife.rb:119:in `load_commands'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife.rb:167:in `run'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/application/knife.rb:123:in `run'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/bin/knife:25:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/bin/knife:23:in `load'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/bin/knife:23:in `<main>'
The accepted answer isn't entirely correct. The problem isn't ruby 2.0, it's rubygems 2.x. If you run gem update --system 1.8.25 to downgrade to a pre 2.x rubygems, everything works like a champ.
NOTE: I haven't had to do this locally, but this is how I've gotten knife bootstrap to work against my remote servers. I'm running ruby 2.0 on my local machine with latest rubygems and chef 11.4.4 and everything else seems to work properly.
According to this issue at opscode it was a bug. It has been fixed in chef 11.6.0.
The problem is that only chef 11.4.4 is on rubygems as of today (2013-06-23)
So, either use 1.9.x or rubygems 1.8.25 will work for now, until the next version of chef comes out. It may be possible to build it from https://github.com/opscode/chef.git
I ended up patching my chef 11.4.4 lib/chef/provider/package/rubygems.rb with this file: https://github.com/opscode/chef/blob/d6748efde62502ab6f5d97052f46ca00352497ef/lib/chef/provider/package/rubygems.rb
I had similar errors trying to use Chef (10.24 and 11.4) with Ruby 2.0 - so I assume Chef is not yet Ruby 2.0 compatible :(
The accepted answer is great if you're using the system ruby (/usr/bin/ruby, for example), but it didn't work for me because I'm using RVM. I found an equivalent solution in case you're using RVM:
rvm rubygems 1.8.25 will install rubygems version 1.8.25 for your RVM ruby.
I'm getting an error trying to run an app, not even trying to do anything sophisticated either, just get the basic thing running... Just wondering if anyone can give me any pointers as to how to debug it. I suspect it might be to do with RVM gemsets, but I'm not sure...
Here's the error message I'm receiving:
NameError: uninitialized constant ActiveSupport::Deprecation
~/Developer/.rvm/gems/ruby-1.9.3-p0#global/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36:in `const_missing'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/activesupport-3.2.1/lib/active_support/core_ext/module/deprecation.rb:7:in `deprecate'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/activesupport-3.2.1/lib/active_support/core_ext/module/synchronization.rb:44:in `<class:Module>'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/activesupport-3.2.1/lib/active_support/core_ext/module/synchronization.rb:6:in `<top (required)>'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/activesupport-3.2.1/lib/active_support/core_ext/module.rb:8:in `require'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/activesupport-3.2.1/lib/active_support/core_ext/module.rb:8:in `<top (required)>'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/padrino-core-0.9.21/lib/padrino-core/support_lite.rb:13:in `require'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/padrino-core-0.9.21/lib/padrino-core/support_lite.rb:13:in `<top (required)>'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/padrino-core-0.9.21/lib/padrino-core.rb:2:in `require'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/padrino-core-0.9.21/lib/padrino-core.rb:2:in `<top (required)>'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/padrino-0.9.21/lib/padrino.rb:2:in `require'
~/Developer/.rvm/gems/ruby-1.9.3-p0#marathon_site/gems/padrino-0.9.21/lib/padrino.rb:2:in `<top (required)>'
~/Developer/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.rc.7/lib/bundler/runtime.rb:68:in `require'
~/Developer/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.rc.7/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
~/Developer/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.rc.7/lib/bundler/runtime.rb:66:in `each'
~/Developer/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.rc.7/lib/bundler/runtime.rb:66:in `block in require'
~/Developer/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.rc.7/lib/bundler/runtime.rb:55:in `each'
~/Developer/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.rc.7/lib/bundler/runtime.rb:55:in `require'
~/Developer/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.rc.7/lib/bundler.rb:118:in `require'
~/Documents/Projects/MarathonSite/config/boot.rb:8:in `<top (required)>'
I have activesupport 3.2.1 listed in the gemset with my project, so I'm not entirely sure why it's complaining. Any pointers as to what's going on would be appreciated, so I can debug this kind of thing in the future.
Seems a gem clashing.
Update padrino to latest version 0.10.5 (or 0.10.6.c)
gem install padrino --pre
Try using a stable version of bundler
gem uninstall bundler -a; gem install bundler
Edit gemfile of your project and point to padrino 0.10.5 or 0.10.6.c