Cucumber + Minitest Error - ruby

I've started to use Cucumber and wrote a simple test before the code implementation and cucumber said that minitest required. How can i require minitest in cucumber and how or in which file minitest should be required? Thanks in advance.
This is my error log:
Warning: you should require 'minitest/autorun' instead.
From C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/test/unit/assertions.rb:1:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/rb_support/rb_language.rb:17:in `rescue in rescue in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/rb_support/rb_language.rb:12:in `rescue in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/rb_support/rb_language.rb:9:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/cli/options.rb:3:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/cli/configuration.rb:2:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/cli/main.rb:12:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/bin/cucumber:11:in `<top (required)>'
C:/Ruby200/bin/cucumber:23:in `load'
C:/Ruby200/bin/cucumber:23:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'
MiniTest::Unit::TestCase is now Minitest::Test. From C:/Ruby200/lib/ruby/2.0.0/test/unit/testcase.rb:8:in `<module:Unit>'
undefined method `_run_suite' for class `Test::Unit::Runner' (NameError)
C:/Ruby200/lib/ruby/2.0.0/test/unit.rb:670:in `<class:Runner>'
C:/Ruby200/lib/ruby/2.0.0/test/unit.rb:255:in `<module:Unit>'
C:/Ruby200/lib/ruby/2.0.0/test/unit.rb:9:in `<module:Test>'
C:/Ruby200/lib/ruby/2.0.0/test/unit.rb:8:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/core_ext/disable_mini_and_test_unit_autorun.rb:2:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/runtime.rb:23:in `initialize'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/cli/main.rb:44:in `new'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/cli/main.rb:44:in `execute!'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/bin/cucumber:13:in `<top (required)>'
C:/Ruby200/bin/cucumber:23:in `load'
C:/Ruby200/bin/cucumber:23:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'

The particular error you are getting was a bug in cucumber and has been fixed in the latest release of cucumber 1.3.3.
You will probably also need something like this:
require 'minitest'
module MiniTestAssertions
def self.extended(base)
base.extend(MiniTest::Assertions)
base.assertions = 0
end
attr_accessor :assertions
end
World(MiniTestAssertions)
in your features/support/ directory.
Please see cucumber issues: #489 & 456

Related

vagrant up command return errors

I am setting up a fast hadoop cluster development envirment with vagrant, but met error when "vagrant up".
I have tried "vagrant plugin install vagrant-centos7_fix", but no luck.
followings are these errors:
C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:70:in `block in <class:Response>': undefined method `downcase' for nil:NilClass (NoMethodError)
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:68:in `each'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:68:in `inject'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:68:in `<class:Response>'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:16:in `<module:SFTP>'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:3:in `<module:Net>'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:3:in `<top (required)>'
from C:/zjsw/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/zjsw/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/request.rb:2:in `<top (required)>'
from C:/zjsw/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/zjsw/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/session.rb:5:in `<top (required)>'
from C:/zjsw/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/zjsw/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp.rb:2:in `<top (required)>'
from C:/zjsw/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/zjsw/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/communicators/ssh/communicator.rb:12:in `<top (required)>'
from C:/zjsw/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/zjsw/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/communicators/ssh/plugin.rb:14:in `block in <class:Plugin>'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/registry.rb:27:in `get'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:259:in `communicate'
from C:/zjsw/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'

need basic setup to test a website on real android device (chrome browser) using ruby appium framework

I am trying to setup a basic framework with Cucumber, Appium and Ruby. I am getting errors when I run the basic script. I am testing web app on chrome browser for Android device. I can't figure out what's wrong with the setup. Appium Desktop for windows is running in the background
(Appium v1.12.1)
My env.rb
require "appium_lib"
def caps
{caps:
{
deviceName: "Android_Device",
platformName: "Android",
browserName: "Chrome",
newCommandTimeout: "3600"
}
}
end
Appium::Driver.new(caps, true)
Appium.promote_appium_methods Object
My hooks.rb file
Before do
$driver.start_driver
end
After do
sleep 3
$driver.driver.quit
end
My Step Definition file
Given(/^I log on to the site with the following:$/) do |table|
p "it works"
end
My feature file
Given I log on to the site with the following:
|site|
|ABC|
I am expecting the feature/scenario to pass
Actual Result-
C:\Users\Documents\xyz\abc (master)
λ cucumber features\Simple_POC.feature --tags #run
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
cannot load such file -- 2.5/rubyeventmachine (LoadError)
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x64-mingw32/lib/rubyeventmachine.rb:2:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:8:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faye-websocket-0.10.7/lib/faye/websocket.rb:10:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib_core-3.0.4/lib/appium_lib_core/common/ws/websocket.rb:15:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib_core-3.0.4/lib/appium_lib_core/common.rb:21:in `require_relative'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib_core-3.0.4/lib/appium_lib_core/common.rb:21:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib_core-3.0.4/lib/appium_lib_core.rb:18:in `require_relative'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib_core-3.0.4/lib/appium_lib_core.rb:18:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib-10.2.0/lib/appium_lib/appium.rb:5:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib-10.2.0/lib/appium_lib.rb:10:in `require_relative'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib-10.2.0/lib/appium_lib.rb:10:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
C:/Users/Documents/xyz/abc/features/support/env.rb:1:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/glue/registry_and_more.rb:107:in `load'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/glue/registry_and_more.rb:107:in `load_code_file'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime/support_code.rb:144:in `load_file'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime/support_code.rb:85:in `block in load_files!'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime/support_code.rb:84:in `each'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime/support_code.rb:84:in `load_files!'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime.rb:272:in `load_step_definitions'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime.rb:68:in `run!'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/cli/main.rb:34:in `execute!'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/bin/cucumber:9:in `<top (required)>'
C:/Ruby25-x64/bin/cucumber:23:in `load'
C:/Ruby25-x64/bin/cucumber:23:in `<main>'
was able to resolve the issue by doing the following -
1) gem uninstall eventmachine
2) gem install eventmachine --platform ruby
Tried few other solutions but the only one which worked are the above 2 steps.
Might help someone in the future

Ruby Rake - Error

I am using vmware and trying to run rake db:migrate for getting the database tables. I am getting this error.
ubuntu#ubuntu-VirtualBox:~/hw-acceptance-unit-test-cycle/rottenpotatoes$ bundle exec rake db:migrate
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'coffee-rails'.
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in ` autodetect'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-rails-4.1.1/lib/coffee-rails.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-rails-4.1.1/lib/coffee-rails.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/config/application.rb:12:in `<top (required)>'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:in `require'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:79:in `block in run'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:77:in `run'
/var/lib/gems/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Bundler Error Backtrace:
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/config/application.rb:12:in `<top (required)>'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:in `require'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-rails-4.1.1/lib/coffee-rails.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-rails-4.1.1/lib/coffee-rails.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in block in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:ineach'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:inrequire'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/config/application.rb:12:in <top (required)>'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:inrequire'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-11.2.2/exe/rake:27:in'
(See full trace by running task with --trace)
What is the problem?
If you are on Linux then run:
sudo apt-get install nodejs
On Mac:
brew install node
and then run bundle and try to migrate. Must work.
Also you shall be more attentive to the search on Stackoverflow for not to duplicate same topics.
Rails - Could not find a JavaScript runtime?

How to resolve "cannot load such file -- iconv" in Rhodes framework

I would like to create a new app using the Rhodes framework but I have some errors like this:
C:\Users\TOUCH>rhodes app pharma
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:120:in `require': cannot load such file -- iconv (LoadError)
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:120:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-2.3.18/lib/active_support/inflector.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-2.3.18/lib/active_support/core_ext/integer/inflections.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-2.3.18/lib/active_support/core_ext/integer.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-2.3.18/lib/active_support/core_ext.rb:8:in `block in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-2.3.18/lib/active_support/core_ext.rb:8:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-2.3.18/lib/active_support/core_ext.rb:8:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-2.3.18/lib/active_support.rb:56:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhodes-3.5.1.12/res/generators/rhogen.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:120:in `require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:120:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhodes-3.5.1.12/bin/rhogen:5 :in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhodes-3.5.1.12/bin/rhodes:4 :in `load'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhodes-3.5.1.12/bin/rhodes:4 :in `<top (required)>'
from C:/Ruby22-x64/bin/rhodes:22:in `load'
from C:/Ruby22-x64/bin/rhodes:22:in `<main>'
How can I resolve it?

When I start the server in Ruby On Rails it exits as soon as it starts and sometimes doesn't even start, just gives an error

This is the error message in Windows:
C:\Users\USER\Sites\new_cms>rails s
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogir
.rb:29:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw3
/lib/nokogiri.rb:29:in `rescue in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw3
/lib/nokogiri.rb:25:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.1/lib/loofah.rb:
:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.1/lib/loofah.rb:
:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/
ib/rails-html-sanitizer.rb:2:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/
ib/rails-html-sanitizer.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action
view/helpers/sanitize_helper.rb:3:in `require'
from C:/Ruby22-x64/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-x64/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-x64/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-x64/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-x64/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-x64/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-x64/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-x64/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-x64/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-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action
view/helpers/form_helper.rb:4:in `require'
from C:/Ruby22-x64/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-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action
view/helpers.rb:50:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action
view/helpers.rb:4:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action
view/helpers.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/rails/legacy_asset_tag_helper.rb:7:in `<module:LegacyAssetTagHelper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/rails/legacy_asset_tag_helper.rb:6:in `<module:Rails>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/rails/legacy_asset_tag_helper.rb:4:in `<module:Sprockets>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/rails/legacy_asset_tag_helper.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/rails/helper.rb:45:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/rails/helper.rb:45:in `<module:Helper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/rails/helper.rb:7:in `<module:Rails>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/rails/helper.rb:6:in `<module:Sprockets>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/rails/helper.rb:5:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/railtie.rb:6:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/s
rockets/railtie.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/r
ils/railtie.rb:2:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/r
ils/railtie.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/r
ils.rb:11:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/r
ils.rb:11:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass-r
ils.rb:1:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass-r
ils.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/r
ntime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/r
ntime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/r
ntime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/r
ntime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/r
ntime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/r
ntime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler.r
:134:in `require'
from C:/Users/USER/Sites/new_cms/config/application.rb:7:in `<top (requ
red)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/co
mands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/co
mands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/co
mands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/co
mands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/co
mands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/co
mands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
C:\Users\USER\Sites\new_cms>
Nokogiri doesn't have binaries for Ruby 2.2.1 available for the mingw32 platform due to some problems with cross compiling Ruby 2.2.1 for the rake-compiler-dev-box.
Since Nokogiri doesn't natively compile on Windows, the only fix is to downgrade to Ruby 2.1.5. Once the next patch level of Ruby 2.2 is released hopefully the problem will be solved.
try to
rvm ruby-2.2.0 gem update --system
Looks like ur nokogiri path broken
ps edited on ur rvm version

Resources