Why won't Rails' console start or make new apps? - ruby-on-rails

A few days ago I updated my gems because things weren't running so fine, so I went back to 1.4.2. Since then I'm getting all kind of weird errors.
I'm using Ruby 2.0.0p247, Rails 4.0 and Ubuntu.
If I try to start a new app using rails new eraseme, everything goes fine until it's time to do bundle install. The output is:
run bundle install
/usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/generators/app_base.rb:270:in `require': cannot load such file -- bundler (LoadError)
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/generators/app_base.rb:270:in `bundle_command'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/generators/app_base.rb:277:in `run_bundle'
from (eval):1:in `run_bundle'
from /usr/local/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /usr/local/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /usr/local/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `block in invoke_all'
from /usr/local/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `map'
from /usr/local/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `invoke_all'
from /usr/local/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/group.rb:233:in `dispatch'
from /usr/local/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands/application.rb:43:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/cli.rb:15:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/cli.rb:15:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/bin/rails:9:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/bin/rails:9:in `<top (required)>'
from /usr/local/bin/rails:23:in `load'
from /usr/local/bin/rails:23:in `<main>'
If I try to open the console, I get:
>> bundle exec rails console
Loading development environment (Rails 4.0.0)
/usr/local/lib/ruby/2.0.0/irb/locale.rb:150:in `block in search_file': undefined method `try_activate' for Gem:Module (NoMethodError)
from /usr/local/lib/ruby/2.0.0/irb/locale.rb:158:in `block in each_localized_path'
from /usr/local/lib/ruby/2.0.0/irb/locale.rb:167:in `each_sublocale'
from /usr/local/lib/ruby/2.0.0/irb/locale.rb:157:in `each_localized_path'
from /usr/local/lib/ruby/2.0.0/irb/locale.rb:145:in `search_file'
from /usr/local/lib/ruby/2.0.0/irb/locale.rb:124:in `find'
from /usr/local/lib/ruby/2.0.0/irb/locale.rb:108:in `load'
from /usr/local/lib/ruby/2.0.0/irb/locale.rb:32:in `initialize'
from /usr/local/lib/ruby/2.0.0/irb/init.rb:114:in `new'
from /usr/local/lib/ruby/2.0.0/irb/init.rb:114:in `init_config'
from /usr/local/lib/ruby/2.0.0/irb/init.rb:16:in `setup'
from /usr/local/lib/ruby/2.0.0/irb.rb:380:in `start'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands/console.rb:90:in `start'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands/console.rb:9:in `start'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:64:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Have you already installed bundler? If not, try:
gem install bundler
If so, try:
gem install bundler --pre

If you running Ruby version manager, what version are you running? You might be set to the wrong version of Ruby.
I think it would be easier for you if you used RVM or some other version manager.

if you have multiple versions of rubygems installed, uninstall all but the one you want to use.
I think rails 4 requires rubygems 2.x.
Also check the bundler version.

Related

uninitialized constant RubyVM::DebugInspector seen in official Rails getting started guide

I am a new user to Ruby on Rails, and I've been following the official getting started.
Platform: Windows 10
Ruby 2.2.4
Rails 4.2.5.2
What I am doing:
rails new myapp cd myapp bundle install rails server
Then I get this error:
C:\Users\MyUser\AAA\myapp>rails server
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller/mri2.rb:21:in `callers': uninitialized constant RubyVM::DebugInspector (NameError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.3.0/lib/web_console/integration/cruby.rb:28:in `set_backtrace_with_binding_of_caller'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.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.11.2/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from C:/Users/MyUser/AAA/myapp/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/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.5.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have already tried uninstalling debug_inspector and running bundle install after, but the problem persists.
Can anyone help me please?
If it is still actual. Try to add debug_inspector to your Gemfile.
You need to bundle the gem before start rails server. Follow following steps:
rails new myapp
cd myapp
bundle install
rails server
I deleted all versions of debug inspector first:
gem uninstall debug_inspector
then installed it again with the arch -arm64 flag
arch -arm64 gem install debug_inspector
For some reason, it required to install another gem (which may not be necessary for you)
arch -arm64 gem install rbs -v 2.1.0
And after that, the error has gone.

uninitialized constant V8::JSError on starting ruby server on ubuntu 14.04

I'm a complete noob in ruby, so please pardon my mistakes.
I'm installing Apphera (a social networking crawler) on Ubuntu 14.04, and I'm getting this error when I'm trying to start the ruby server
ankit#APPSERVER:/home/deployer/apphera$ rails s
/usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:61:in `rescue in lock': uninitialized constant V8::JSError (NameError)
from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:60:in `lock'
from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:19:in `initialize'
from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:15:in `new'
from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:15:in `instance'
from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/loader.rb:10:in `initialize'
from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less.rb:14:in `new'
from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less.rb:14:in `<module:Less>'
from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less.rb:9:in `<top (required)>'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:76:in `require'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:72:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:72:in `block in require'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:61:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:61:in `require'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler.rb:134:in `require'
from /home/deployer/apphera/config/application.rb:16:in `<top (required)>'
from /usr/lib/ruby/gems/1.9.1/gems/railties-3.2.7/lib/rails/commands.rb:53:in `require'
from /usr/lib/ruby/gems/1.9.1/gems/railties-3.2.7/lib/rails/commands.rb:53:in `block in <top (required)>'
from /usr/lib/ruby/gems/1.9.1/gems/railties-3.2.7/lib/rails/commands.rb:50:in `tap'
from /usr/lib/ruby/gems/1.9.1/gems/railties-3.2.7/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I understand that this issue that got something to do with the JS environment on the system and I tried installing nodes, but the error was same. I tried almost every solution mentioned on SO, but nothing worked for me.
Here are some specific details about my installation:
Ruby : 1.9.1
gem - v : 2.4.5
gem list | grep libv8 --> libv8 3.16.14.7
gem list | grep therubyracer --> therubyracer 0.12.1
I tried installing therubyracer/libv8 both manually and with with bundle install, but it didn't work. I even made changes to my gemfile/Gemfile.lock, but,again, nothing worked.

bundle install Library not loaded error

Environment:
Rails 3.2.11
Heroku bamboo-mri-1.9.2
Using RVM
ruby-1.9.2-p290
my .rvmrc is configured to use ruby-1.9.2-p290
When running the bundle install command, I am getting this:
/Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle, 9): Library not loaded: /opt/local/lib/libcrypto.1.0.0.dylib (LoadError)
Referenced from: /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
Reason: image not found - /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/definition.rb:1:in `<top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/cli.rb:245:in `install'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/bin/bundle:19:in `load'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/bin/bundle:19:in `<main>'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/bin/ruby_noexec_wrapper:14:in `<main>'
Any ideas on how to resolve this?
TRY 1
rvm pkg install openssl
rvm reinstall all --force
then cd .. and cd project_folder
bundle install
All gem install again properly
the first error is gone
BUT when I move into another project using ruby 1.9.3, I get a 'new' error, so it seems like I won't be able to use at the same time 1.9.2 and 1.9.3 ... or I'll have to reinstall my gems everytime ??? I must missing something.
here the new error:
/Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle, 9): Symbol not found: _rb_Digest_SHA1_Finish (LoadError)
Referenced from: /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
Expected in: flat namespace
in /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle - /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
from /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/definition.rb:1:in `<top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/cli.rb:301:in `update'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/bin/bundle:19:in `load'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/bin/bundle:19:in `<main>'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#creativebank/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#creativebank/bin/ruby_noexec_wrapper:14:in `<main>'
Since you mentioned you recently moved from MacPorts to Homebrew, I'd say it's likely that you had some gems that were compiled against a MacPorts-installed library (in /opt/local) that doesn't exist anymore. You should recompile those gems to link against the Homebrew-supplied versions of those libraries (or the Apple ones, if they exist). You can recompile a gem with native components simply be re-installing it.

Ruby on Rails - error when running cucumber: You have already activated activesupport 3.2.1, but your Gemfile requires activesupport 3.1.0.

I know this question has been asked in one form or the another before, but I still can't get a working solution for this.
I'm taking the saas course offered online and the code is directly cloned from
https://github.com/saasbook/hw3_rottenpotatoes
When I run cucumber from the command prompt
Using the default profile...
You have already activated activesupport 3.2.1, but your Gemfile requires activesupport 3.1.0. Using bundle exec may solve this. (Gem::LoadError)
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/bundler-1.0.21/lib/bundler/runtime.rb:31:in `block in setup'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/bundler-1.0.21/lib/bundler/runtime.rb:17:in `setup'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/bundler-1.0.21/lib/bundler/setup.rb:7:in `<top (required)>'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
/Users/chemin/rails_projects/saas/hw3_rottenpotatoes/config/boot.rb:6:in `<top (required)>'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/rails_projects/saas/hw3_rottenpotatoes/config/application.rb:1:in `<top (required)>'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/rails_projects/saas/hw3_rottenpotatoes/config/environment.rb:2:in `<top (required)>'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-rails-1.3.0/lib/cucumber/rails.rb:7:in `<top (required)>'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
/Users/chemin/rails_projects/saas/hw3_rottenpotatoes/features/support/env.rb:7:in `<top (required)>'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/rb_support/rb_language.rb:129:in `load'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/rb_support/rb_language.rb:129:in `load_code_file'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:171:in `load_file'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:82:in `each'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime.rb:175:in `load_step_definitions'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime.rb:40:in `run!'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/cli/main.rb:20:in `execute'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/bin/cucumber:14:in `<top (required)>'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/bin/cucumber:19:in `load'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/bin/cucumber:19:in `<main>'
after running bundle install version I get an even uglier message
Could not find rack-cache (~> 1.1) amongst [actionmailer-3.1.0, actionpack-3.1.0, activemodel-3.1.0, activerecord-3.1.0, activeresource-3.1.0, activesupport-3.1.0, addressable-2.2.7, archive-tar-minitar-0.5.2, arel-2.2.1, bcrypt-ruby-3.0.1, builder-3.0.0, capybara-1.1.2, childprocess-0.3.1, coffee-rails-3.1.1, coffee-script-2.2.0, coffee-script-source-1.2.0, columnize-0.3.6, cucumber-1.1.8, cucumber-rails-1.3.0, cucumber-rails-training-wheels-1.0.0, database_cleaner-0.7.1, diff-lcs-1.1.3, erubis-2.7.0, execjs-1.3.0, ffi-1.0.11, gherkin-2.8.0, haml-3.1.4, hike-1.2.1, i18n-0.6.0, jquery-rails-1.0.19, json-1.6.5, json_pure-1.6.5, launchy-2.0.5, libv8-3.3.10.4-x86_64-darwin-10, linecache19-0.5.12, mail-2.3.0, mime-types-1.17.2, multi_json-1.1.0, nokogiri-1.5.0, polyglot-0.3.3, rack-1.3.6, rack-cache-1.0.3, rack-mount-0.8.3, rack-ssl-1.3.2, rack-test-0.6.1, rails-3.1.0, railties-3.1.0, rake-0.9.2.2, rdoc-3.12, ruby-debug-base19-0.11.25, ruby-debug19-0.11.6, ruby_core_source-0.1.5, rubyzip-0.9.6.1, sass-3.1.15, sass-rails-3.1.5, selenium-webdriver-2.13.0, sprockets-2.0.3, sqlite3-1.3.5, term-ansicolor-1.0.7, therubyracer-0.9.10, thor-0.14.6, tilt-1.3.3, treetop-1.4.10, tzinfo-0.3.31, uglifier-1.2.3, xpath-0.1.4] (Gem::LoadError)
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:451:in `block in find_in_unresolved'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:451:in `map'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:451:in `find_in_unresolved'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:43:in `require'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/bundler-1.0.21/lib/bundler/dsl.rb:1:in `<top (required)>'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/bundler-1.0.21/lib/bundler/definition.rb:17:in `build'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/bundler-1.0.21/lib/bundler.rb:138:in `definition'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/bundler-1.0.21/lib/bundler.rb:126:in `load'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/bundler-1.0.21/lib/bundler/setup.rb:7:in `<top (required)>'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
/Users/chemin/rails_projects/saas/hw3_rottenpotatoes/config/boot.rb:6:in `<top (required)>'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/rails_projects/saas/hw3_rottenpotatoes/config/application.rb:1:in `<top (required)>'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/rails_projects/saas/hw3_rottenpotatoes/config/environment.rb:2:in `<top (required)>'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-rails-1.3.0/lib/cucumber/rails.rb:7:in `<top (required)>'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
/Users/chemin/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
/Users/chemin/rails_projects/saas/hw3_rottenpotatoes/features/support/env.rb:7:in `<top (required)>'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/rb_support/rb_language.rb:129:in `load'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/rb_support/rb_language.rb:129:in `load_code_file'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:171:in `load_file'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:82:in `each'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime.rb:175:in `load_step_definitions'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/runtime.rb:40:in `run!'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/lib/cucumber/cli/main.rb:20:in `execute'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/cucumber-1.1.9/bin/cucumber:14:in `<top (required)>'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/bin/cucumber:19:in `load'
/Users/chemin/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/bin/cucumber:19:in `<main>'
There's a couple solutions, the easiest of which would be to try running bundle exec cucumber first, and see if that solves your problem.
If that doesn't work, delete your rails3tutorial gemset and re-create it again:
rvm gemset delete rails3tutorial
rvm 1.9.2-p290#rails3tutorial --create
Then run bundle, and hopefully it will install your gems for you. Follow this up with bundle exec cucumber (I almost always run my specs and cukes using bundle exec so that it doesn't try accidentally loading stale gems).
Hopefully this works!
UPDATE: Explaining bundle exec a little more
bundle exec is a command that bundler comes with that will run any other command in the context of your Gemfile. In this case, you're essentially telling it to run the cucumber command but only with the gems from your Gemfile, and not with all the gems currently available.
For instance, if you have previously installed activesupport 3.2.1, and your Gemfile asks for activesupport 3.1.0. When this happens I believe the cucumber command itself pulls in 'activesupport' (maybe via the require 'cucumber/rails' call in env.rb) which grabs any random version of activesupport it can (let's say it grabs 3.2.1) from your available gems. After this, it decides to load up your rails environment to start running your features. When it starts loading your actual app, the code looks at your Gemfile.lock and sees that what you actually want is activesupport 3.1.0, but it can't load an old version on top of a new version, so it crashes with the error James Lin pasted.
This is why, if you're using rvm, it's a good idea to keep separate gemsets for your separate projects, and delete/re-create the gemsets if you're updating your gems on that project so you don't keep old versions of gems around. Alternatively, bundle exec tends to solve 99% of the problems as well. If you aren't using rvm, and have multiple projects, then you probably have many different versions of many different gems, and you should always use bundle exec to do things like execute rake tasks, run cucumer features and other unit tests, etc.
Or you could do bundle update to make sure all your gem plugins are the newest version and it will update your Gemfile.lock, so those two will be consistent.
I guess the difference between bundle exec and bundle update is whether you want bundle provide the version your app asking for or update your app gemfile so that the app wouldn't insist a stale version of gem when newer version installed and cause problem because the gem file.
Because when a version conflict happens, it is generally a good idea to make sure what installed in you system environment consistent with your app Gemfile or lock file as you don't want them trying to use an old version of gem when newer version available, unless you want freeze your gem system using rvm or similar at app level, but again, when you distribute you ruby app, it may cause problem in other machines.
In the end, because the need to distribute your app, unless newer version of gem file doesn't working with existing app, I think it shouldn't insist on an stale known-working version, unless you always want keep it on the safe side which is a valid argument.

rake db:migrate postgreSQL

I finally got the gem pg to install. Now when I go to migrate the database I get the following:
$ rake db:migrate
(in c:/rubyDev/bsbaslic)
rake aborted!
no such file to load -- 1.9/pg_ext
c:/Ruby192/lib/ruby/gems/1.9.1/gems/pg-0.10.0/lib/pg.rb:10:in `require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/pg-0.10.0/lib/pg.rb:10:in `<top (required)>'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:64:in `require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:64:in `block (2 levels) in require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:62:in `each'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:62:in `block in require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:51:in `each'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/runtime.rb:51:in `require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler.rb:112:in `require'
c:/rubyDev/bsbaslic/config/application.rb:7:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
c:/rubyDev/bsbaslic/Rakefile:4:in `<top (required)>'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `load'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
c:/Ruby192/lib/ruby/1.9.1/rake.rb:1991:in `run'
c:/Ruby192/bin/rake:31:in `<main>'
Does anybody have any ideas as to what it is looking for? I have a pg_ext.so file in the same directory as pg.rb.
Windows programs cannot load .so files - they load .dll files instead. You need a build of pg compiled for Windows, or you need to be running Ruby from within a Linuxy environment such as msys or cygwin.
The problem is in your version of pg gem. There is a special version for windows pg 0.9.0.
In order to have it workingon windows:
uninstall the current pg 0.10.0
install pg as follows: gem install pg --version=0.9.0 -- --with-pg-config=/short/path/to/postresql/bin
(To get short path you can simply change directory to PostgrSQL bin and then type command in cmd, it will automaticaly change path to a short verison)
Then edit your project Gemfile in order to use correct pg gem version (0.9.0)
And that's it.
Good Luck

Resources