Cucumber not working on my machine - ruby-on-rails

Cucumber is somehow not working on my machine. Now on running
bundle show cucumber
I am getting
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6
but when I now try to run the features on my application I am getting the following error
bundle exec cucumber features
Using the default profile...
no such file to load -- crack/core_extensions (LoadError)
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/opt/local/lib/ruby/gems/1.8/gems/pusher-0.6.0/lib/pusher/channel.rb:1
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/opt/local/lib/ruby/gems/1.8/gems/pusher-0.6.0/lib/pusher.rb:67
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each'
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `require'
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each'
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `require'
/opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler.rb:120:in `require'
/Users/gauravsingharoy/work/tiatros/config/application.rb:7
/Users/gauravsingharoy/work/tiatros/config/environment.rb:2:in `require'
/Users/gauravsingharoy/work/tiatros/config/environment.rb:2
/opt/local/lib/ruby/gems/1.8/gems/cucumber-rails-1.0.2/lib/cucumber/rails.rb:5:in `require'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-rails-1.0.2/lib/cucumber/rails.rb:5
/Users/gauravsingharoy/work/tiatros/features/support/env.rb:7:in `require'
/Users/gauravsingharoy/work/tiatros/features/support/env.rb:7
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/cucumber/rb_support/rb_language.rb:143:in `load'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/cucumber/runtime/support_code.rb:171:in `load_file'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/cucumber/runtime/support_code.rb:83:in `load_files!'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/cucumber/runtime/support_code.rb:82:in `each'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/cucumber/runtime.rb:137:in `load_step_definitions'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/cucumber/runtime.rb:39:in `run!'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/cucumber/cli/main.rb:43:in `execute!'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/cucumber/cli/main.rb:20:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/cucumber:14
/opt/local/lib/ruby/gems/1.8/bin/cucumber:19:in `load'
/opt/local/lib/ruby/gems/1.8/bin/cucumber:19

REF FOR INSTALLING RVM:
http://seanbehan.com/mac-os-x/installing-and-using-rvm-on-mac-os-x-creating-gemsets-and-reverting-to-original-environment/

Looks like bundler can't find your dependencies. You appear to be using a System-wide ruby installation which is unrecommended.
I recommend you install rvm and reinstall ruby using rvm's method then running bundle again once everything is configured and working correctly.

Related

cucumber/formatter/legacy_api/ast (LoadError) when updating cucumber

I'm upgrading Ruby from version 2.5.1 to 2.7.2.
So, I'm Upgrading Cucumber from 3.1.2 to the latest version 8.0.0.rc.1
I'm just learning Ruby as I work, so I'm sorry if I ask any question that is too easy for you.
The stack for the error is:
loading content yaml support/data/static_content.yaml
loading environment yaml support/environments/stage.yaml
cannot load such file -- cucumber/formatter/legacy_api/ast (LoadError)
/home/acabista/Documents/automations/web-automation/cucumber/support/patches/rerun_file.rb:2:in `require'
/home/acabista/Documents/automations/web-automation/cucumber/support/patches/rerun_file.rb:2:in `<top (required)>'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/glue/registry_and_more.rb:123:in `require'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/glue/registry_and_more.rb:123:in `load_code_file'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime/support_code.rb:145:in `load_file'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime/support_code.rb:82:in `block in load_files!'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime/support_code.rb:81:in `each'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime/support_code.rb:81:in `load_files!'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime.rb:274:in `load_step_definitions'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime.rb:74:in `run!'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/cli/main.rb:29:in `execute!'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/bin/cucumber:9:in `<top (required)>'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/bin/cucumber:23:in `load'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/bin/cucumber:23:in `<main>'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/bin/ruby_executable_hooks:24:in `eval'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/bin/ruby_executable_hooks:24:in `<main>'
[acabista#acabista cucumber]$ ./start_auto.sh
loading content yaml support/data/static_content.yaml
loading environment yaml support/environments/stage.yaml
cannot load such file -- cucumber/formatter/legacy_api/ast (LoadError)
/home/acabista/Documents/automations/web-automation/cucumber/support/patches/rerun_file.rb:2:in `require'
/home/acabista/Documents/automations/web-automation/cucumber/support/patches/rerun_file.rb:2:in `<top (required)>'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/glue/registry_and_more.rb:123:in `require'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/glue/registry_and_more.rb:123:in `load_code_file'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime/support_code.rb:145:in `load_file'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime/support_code.rb:82:in `block in load_files!'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime/support_code.rb:81:in `each'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime/support_code.rb:81:in `load_files!'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime.rb:274:in `load_step_definitions'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/runtime.rb:74:in `run!'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/lib/cucumber/cli/main.rb:29:in `execute!'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/gems/cucumber-8.0.0/bin/cucumber:9:in `<top (required)>'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/bin/cucumber:23:in `load'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/bin/cucumber:23:in `<main>'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/bin/ruby_executable_hooks:24:in `eval'
/home/acabista/.rvm/gems/ruby-2.7.2#web-automation/bin/ruby_executable_hooks:24:in `<main>'
These are the first 2 lines from the file rerun_file.rb that is throwing the error:
require 'cucumber/formatter/io'
require 'cucumber/formatter/legacy_api/ast'
And I just use Ast in two parts of my code:
!(Cucumber::Formatter::LegacyApi::Ast::ScenarioOutline === feature_element)
Cucumber::Ast::OutlineTable::ExampleRow === table_row
I can't post more of the code because it's proprietary.
I already tried some other things that I found here in stackoverflow but nothing seems to work, and I really want to upgrade Cucumber, so going back to 3.1.2 is not a fix. How can I do that?

Nokogiri Incompatible Library Error when trying to Use Carrierwave Gem uploader - Rails

I'm trying to use the Carrierwave gem to add pictures to my site. As soon as I use the gem uploader, I get the following error telling me that I have an incompatible library version referencing Nokogiri 1.8.1 ...
/Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:32:in `require': incompatible library version - /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.bundle (fatal)
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:32:in `rescue in <top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:28:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/loofah-2.1.1/lib/loofah.rb:3:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/loofah-2.1.1/lib/loofah.rb:3:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/rails-html-sanitizer-1.0.3/lib/rails-html-sanitizer.rb:2:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/rails-html-sanitizer-1.0.3/lib/rails-html-sanitizer.rb:2:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/sanitize_helper.rb:2:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/sanitize_helper.rb:2:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/text_helper.rb:32:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/text_helper.rb:32:in `<module:TextHelper>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/text_helper.rb:29:in `<module:Helpers>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/text_helper.rb:6:in `<module:ActionView>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/text_helper.rb:4:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_tag_helper.rb:18:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_tag_helper.rb:6:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_helper.rb:4:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_helper.rb:4:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers.rb:50:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers.rb:50:in `<module:Helpers>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers.rb:3:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/context.rb:1:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/context.rb:1:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/railtie.rb:7:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/railtie.rb:7:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/railties-5.0.6/lib/rails/all.rb:14:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/railties-5.0.6/lib/rails/all.rb:14:in `block in <top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/railties-5.0.6/lib/rails/all.rb:12:in `each'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/railties-5.0.6/lib/rails/all.rb:12:in `<top (required)>'
from /Users/danieluribe/code/one_stop_ror/yelpdemo/config/application.rb:3:in `require'
from /Users/danieluribe/code/one_stop_ror/yelpdemo/config/application.rb:3:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:92:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:92:in `preload'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/danieluribe/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/danieluribe/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Most of the solutions I've seen online include references to libxml2 but I see no references in my error to that. I have however tried the solution here with no success.
I have uninstalled and reinstalled both nokogiri and libxml multiple times using brew. I've also used the installation for Nokogiri on Mac as mentioned on their page here.
I'm not 100-percent sure if it's simply a Nokogiri error or whether libxml2 requires a different version than the default. The current version I'm using for libxml2 is 2.9.3. Any help or pointing in the right direction will be greatly appreciated. Let me know if more details are needed.
Try installing the development files if you haven't already:
sudo apt-get install g++ build-essential -y
EDIT: Oops, for mac try this: https://github.com/kennethreitz/osx-gcc-installer
EDIT: Another idea, remove Nokogiri version from the Gemfile then try
gem install nokogiri -v 1.6.8.1 -- --use-system-libraries=true --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2

rhc setup on Windows shows 'require' errors

I am trying to setup rhc tools on a newly installed Windows 8.1 Pro x64. I already have git, ruby and successfully installed the rhc gem.
The tutorial I used - https://developers.openshift.com/en/getting-started-windows.html#client-tools
I've used rhc tools on Ubuntu and never on Windows, and I have no idea what the error means.
Doing rhc setup shows the following error:
>rb --version
ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]
>git --version
git version 1.9.5.msysgit.1
>rhc setup
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' : cannot load such file -- dl/import (LoadError)
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54 :in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent/socket.rb:5:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent.rb:22:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/key_manager.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh.rb:11:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/ssh_helpers.rb:18:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:77:in `<class:Wizard>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:7:in `<module:RHC>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands/base.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands/account.rb:2:in `<module:Commands>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands/account.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands.rb:189:in `block in load'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands.rb:188:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands.rb:188:in `load'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/cli.rb:36:in `start'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/bin/rhc:20:in `<top (required)>'
from C:/Ruby22-x64/bin/rhc:23:in `load'
from C:/Ruby22-x64/bin/rhc:23:in `<main>'
Edit:
The following post solves the problem - rhc setup gives error `no such file dl/import`
It seems that there is also a bug reported for this - https://bugzilla.redhat.com/show_bug.cgi?id=1201844
For windows:
gem install net-ssh -v 2.9.3.beta1
I have a lot of experience running Ruby on Windows, but finally I (and others) came up to conclusion that it's not possible to run some gems without errors on Windows at the moment.
You can run and install one gem, but you'll get an error in another gem. Finally I tired fixing them.
But good news is that you can use Vagrant + VirtualBox + Rails on Windows. You may want to read my blog post about that.
I was getting this problem too. you are using "Ruby 2.2.0". Please use 1.9.3 version instead. It'll work like a charm

Stuck installing Rails: rails s and bundle exec rails server error

I am using Windows 7, Ruby 2.2.1, and Rails 4.2.0.
I get the following error after running rails s or bundle exec rails server:
C:/Ruby22/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x86-mingw32/lib/nokogiri.rb:29:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x86-mingw32/lib/nokogiri.rb:29:in `rescue in <top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x86-mingw32/lib/nokogiri.rb:25:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/loofah-2.0.1/lib/loofah.rb:3:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/loofah-2.0.1/lib/loofah.rb:3:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.1/lib/rails-html-sanitizer.rb:2:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.1/lib/rails-html-sanitizer.rb:2:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/sanitize_helper.rb:3:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/sanitize_helper.rb:3:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/text_helper.rb:32:in `<module:TextHelper>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/text_helper.rb:29:in `<module:Helpers>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/text_helper.rb:6:in `<module:ActionView>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/text_helper.rb:4:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/form_tag_helper.rb:6:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/form_helper.rb:4:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers/form_helper.rb:4:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers.rb:50:in `<module:Helpers>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers.rb:3:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/legacy_asset_tag_helper.rb:7:in `<module:LegacyAssetTagHelper>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/legacy_asset_tag_helper.rb:6:in `<module:Rails>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/legacy_asset_tag_helper.rb:4:in `<module:Sprockets>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/legacy_asset_tag_helper.rb:3:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/helper.rb:45:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/helper.rb:45:in `<module:Helper>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/helper.rb:7:in `<module:Rails>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/helper.rb:6:in `<module:Sprockets>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/helper.rb:5:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/railtie.rb:6:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/railtie.rb:6:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails/railtie.rb:2:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails/railtie.rb:2:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:11:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:11:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler.rb:134:in `require'
from C:/Users/David/Documents/testapp/config/application.rb:7:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have also run gem list, and these gems are installed. Is it an issue with certain gem versions?
Also, it's 64-bit Windows; could it be in issue with that? I installed the 32 bit, so it should be compatible, right? I will try to uninstall and re-install everything with the 64-bit version of the DevKit and Ruby.
Thanks!
I had a very similar issue just today. I tried to do a new installation of ruby and rails today and I couldn't get "rails server" to work for the exact same reason.
In order to get this to work, you need to run
gem install nokogiri --platform="ruby"
but this fails on Windows because nokogiri doesn't compile properly on Windows.
It's supposed to work with the pre-compiled binary installation that RubyGems pulls down, but I think there's a bug somewhere in RubyGems or nokogiri that's causing this to not work right now, but I'm not sure.
Yeah, so I rolled back to 2.0.0. and it worked. You get "DL is deprecated, please use Fiddle" which I found here, Ruby 2.0.0p0 IRB warning: "DL is deprecated, please use Fiddle", is just a warning. Still switching to Ubuntu soon.

Installed ruby via RVM doesn't run (says NoMemoryError)

I've tried to implode the rvm and install everything from scratch, strangely it worked until I restarted my shell (I use zsh, but the same happens on bash).
The console output:
➜ ~backend_folder git:(master) ✗ which rails
/Users/shaioz/.rvm/gems/ruby-1.9.3-p429/bin/rails
➜ ~backend_folder git:(master) ✗ rails server
ruby(10188,0x7fff7176c180) malloc: *** mmap(size=1125878379425792) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
ruby(10188,0x7fff7176c180) malloc: *** mmap(size=1125878379425792) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
/Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require': failed to allocate memory (NoMemoryError)
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/debugger-1.6.0/lib/ruby-debug-base.rb:1:in `<top (required)>'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/debugger-1.6.0/lib/ruby-debug.rb:5:in `<top (required)>'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/debugger-1.6.0/lib/debugger.rb:4:in `<top (required)>'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/shaioz/projects/flayvr-backend/config/application.rb:7:in `<top (required)>'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.1.1/lib/rails/commands.rb:52:in `require'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.1.1/lib/rails/commands.rb:52:in `block in <top (required)>'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.1.1/lib/rails/commands.rb:49:in `tap'
from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.1.1/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
(This also happens when I use irb, I have at least 2 GB of RAM available)
When I try to 'rvm get', I get this:
cat: /Users/shaioz/.rvm/help/get: No such file or directory
Could not update RVM, get some help at #rvm IRC channel at freenode servers.
But strangely the rvm wasn't installed on sudo user, and .rvm sits on my user's homedir.
I'm running on OSX 10.8.3
I figured it out.
In $PATH, I had the local ruby take precedent over the ruby installed by rvm, but the rails was the one installed by rvm to match the ruby version.
(the incorrect $PATH was due to an unneeded entry in my zshrc)
in short, if you're having a similar problem try to
$ which ruby; which rails
and see if they are the correct versions.

Resources