I'm trying to run this: https://github.com/jmopr/job-hunter
I executed it via the command: rails server. collected a few job postings to apply to, then when i clicked on "Apply to jobs" a window popped up but none of the information that was to be submitted to indeed.com got pasted in the forms. The window then closed and it went on to the next job profile. It doesn't seem like it is able to select the proper frame, and i'm not sure exactly what causes this.
main error:
[remote server] file:///tmp/webdriver-profile20170831-19043-haskqi/extensions/fxdriver#googlecode.com/components/driver-component.js:10840:in `FirefoxDriver.prototype.switchToFrame': Unable to locate frame: 1 (Selenium::WebDriver::Error::NoSuchFrameError)
Since i suspect the main culprit here are compatibility issues, here are a list of software and specific gems that may be out of date or updated in a way that makes it incompatible:
Firefox: 45. Ubuntu 16.04. Geckodriver 1.18.0(irrelevant???)
Selenium: 0.2.11. Selenium webdriver: 2.53.0.
I tried playing around with different versions of firefox, the webdriver to see if i had any compatibility issues, no success. Here is the rest of the error:
Started GET "/users/apply" for 127.0.0.1 at 2017-08-31 14:08:21 -0700
Processing by JobsController#apply as HTML
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
Job Load (0.3ms) SELECT "jobs".* FROM "jobs" WHERE (score > 40)
Running via Spring preloader in process 19571
applier.rb:121: warning: key "How did you hear about this job?" is duplicated and overwritten on line 127
^C[2017-08-31 14:08:31] INFO going to shutdown ...
/var/lib/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/abstract_process.rb:148:in `sleep': Interrupt
from /var/lib/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/abstract_process.rb:148:in `poll_for_exit'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/firefox/binary.rb:59:in `quit'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/firefox/launcher.rb:62:in `quit'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/firefox/bridge.rb:77:in `quit'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/common/driver.rb:175:in `quit'
from /var/lib/gems/2.3.0/gems/capybara-2.7.0/lib/capybara/selenium/driver.rb:248:in `quit'
from /var/lib/gems/2.3.0/gems/capybara-2.7.0/lib/capybara/selenium/driver.rb:20:in `block in browser'
from /var/lib/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:161:in `fork'
from /var/lib/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:161:in `serve'
from /var/lib/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:131:in `block in run'
from /var/lib/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:125:in `loop'
from /var/lib/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:125:in `run'
from /var/lib/gems/2.3.0/gems/spring-1.7.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
[remote server] file:///tmp/webdriver-profile20170831-19571-ugrrq/extensions/fxdriver#googlecode.com/components/driver-component.js:10840:in `FirefoxDriver.prototype.switchToFrame': Unable to locate frame: 1 (Selenium::WebDriver::Error::NoSuchFrameError)
from [remote server] file:///tmp/webdriver-profile20170831-19571-ugrrq/extensions/fxdriver#googlecode.com/components/command-processor.js:12661:in `DelayedCommand.prototype.executeInternal_/h'
from [remote server] file:///tmp/webdriver-profile20170831-19571-ugrrq/extensions/fxdriver#googlecode.com/components/command-processor.js:12666:in `DelayedCommand.prototype.executeInternal_'
from [remote server] file:///tmp/webdriver-profile20170831-19571-ugrrq/extensions/fxdriver#googlecode.com/components/command-processor.js:12608:in `DelayedCommand.prototype.execute/<'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/response.rb:70:in `assert_ok'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/response.rb:34:in `initialize'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/http/common.rb:78:in `new'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/http/common.rb:78:in `create_response'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/http/default.rb:90:in `request'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/bridge.rb:649:in `raw_execute'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/bridge.rb:627:in `execute'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/bridge.rb:206:in `switchToFrame'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/common/target_locator.rb:37:in `frame'
from /var/lib/gems/2.3.0/gems/capybara-2.7.0/lib/capybara/selenium/driver.rb:151:in `within_frame'
from applier.rb:29:in `scrape'
from applier.rb:169:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/runner.rb:60:in `load'
from /var/lib/gems/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/runner.rb:60:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /var/lib/gems/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
from /var/lib/gems/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:90:in `runner'
from /var/lib/gems/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /var/lib/gems/2.3.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /home/mo/Desktop/job-hunter-master/bin/rails:9:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `block in load'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /var/lib/gems/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
The sad part is that I had this work before. It drives me crazy not to be able to replicate it. Could missing packages be causing this? Do we need to install the jar files (but i'm not using windows!!) as prompted when you first install the selenium gems?
Code (applier.rb):
def scrape
unless #job.applied
visit #job.url
unless page.has_css?('p.expired')
page.find('a.indeed-apply-button', match: :first).click
page.driver.within_frame(1) do
page.driver.within_frame(0) do
complete_step_one
complete_additional_steps
end
end
end
Job.delete(#job.id)
page.close
end
Related
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?
I'm trying to convert a Rails 4.0 project from PostgreSQL to MySQL.
I have everything working in my local Vagrant VM, but after I do cap deploy, this is what I see in the logs on the production server:
I, [2015-03-25T15:39:12.558662 #28566] INFO -- : Refreshing Gem list
[snip]/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.13/lib/active_support/deprecation.rb:1:in `require': cannot load such file -- singleton (LoadError)
from [snip]/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.13/lib/active_support/deprecation.rb:1:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/configuration.rb:1:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/configuration.rb:1:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/railtie.rb:2:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/railtie.rb:2:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/engine.rb:1:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/engine.rb:1:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/application.rb:4:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/application.rb:4:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails.rb:9:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails.rb:9:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/all.rb:1:in `require'
from [snip]/shared/bundle/ruby/2.2.0/gems/railties-4.0.13/lib/rails/all.rb:1:in `<top (required)>'
from [snip]/releases/20150325221423/config/application.rb:3:in `require'
from [snip]/releases/20150325221423/config/application.rb:3:in `<top (required)>'
from [snip]/releases/20150325221423/config/environment.rb:2:in `require'
from [snip]/releases/20150325221423/config/environment.rb:2:in `<top (required)>'
from config.ru:4:in `require'
from config.ru:4:in `block in <main>'
from [snip]/shared/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from [snip]/shared/bundle/ruby/2.2.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `eval'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `block in builder'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `call'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `build_app!'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:628:in `init_worker_process'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:651:in `worker_loop'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:536:in `maintain_worker_count'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:294:in `join'
from [snip]/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
from [snip]/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `load'
from [snip]/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `<main>'
E, [2015-03-25T15:39:12.723362 #1450] ERROR -- : reaped #<Process::Status: pid 28563 exit 1> worker=0
But my understanding is that singleton is a Ruby feature, not some third-party library that I might be missing. Is that correct? What is the problem here?
Edit: I am in the process of adding Chef to this project. I have set up a second Vagrant VM to test the production config on before I apply it to the actual production server. I have configured this VM to match the production server, as close as I can tell, but the VM works fine.
I finished adding Chef to the project and now use it to configure the production server. Around the same time I also upgraded to Rails 4.2.
I'm no longer getting this error, so it is likely one of those two things that fixed the problem.
I have a mongod running at my network's internal subnet of 10.1.150.24 and my mogoid.yml has these lines:
hosts:
- 10.1.150.24:27017
MongoDB is running without authentication on the remote server.
On the remote server a rails app with - localhost:27017 connects without issues. The mongod.conf has
net:
bindIp: 0.0.0.0
set and should accept connections on all interfaces.
I can see the connection error when I am in rails c on my local and try to create an object or even retrieve one.
Foo.create(...) failes like this:
TypeError: no implicit conversion of nil into String
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/protocol/commands/authenticate.rb:35:in `+'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/protocol/commands/authenticate.rb:35:in `digest'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/protocol/commands/authenticate.rb:47:in `build_auth_command'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/protocol/commands/authenticate.rb:25:in `initialize'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/authenticatable.rb:71:in `new'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/authenticatable.rb:71:in `login'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/authenticatable.rb:28:in `block in apply_credentials'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/authenticatable.rb:26:in `each'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/authenticatable.rb:26:in `apply_credentials'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/node.rb:180:in `block in ensure_connected'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/node.rb:115:in `block in connection'
from /var/lib/gems/2.2.0/gems/connection_pool-2.1.1/lib/connection_pool.rb:62:in `with'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/node.rb:114:in `connection'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/node.rb:178:in `ensure_connected'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/node.rb:589:in `block in flush'
from /var/lib/gems/2.2.0/gems/moped-2.0.3/lib/moped/node.rb:617:in `block in logging'
... 33 levels...
from /var/lib/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/console.rb:9:in `start'
from /var/lib/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:68:in `console'
from /var/lib/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /var/lib/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/mwerner/workspace/pricing/bin/rails:8:in `<top (required)>'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /var/lib/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
Given the number of authentication errors with moped I am confused since there is no authentication on the mongo instance.
EDIT: I also tried ssh tunneling the 27017 port to my local and setting localhost in monogoid.yml No luck
running sudo gem pristine --all and killing the spring process fixed the issue. I can now connect to the remote server.
When trying to run rails server command from the command line I get the following error. The first line seems the most pertinent, as the ones that follow appear to be errors due to the LoadError. However, I'm not really sure.
J:\Github\rails\genepool>rails server
J:/Ruby21/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `require'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:72:in `each'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:72:in `block in require'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:61:in `each'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:61:in `require'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler.rb:133:in `require'
from J:/Github/rails/genepool/config/application.rb:7:in `<top (required)>'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:79:in `require'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:76:in `tap'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:76:in `server'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from J:/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have Sqlite3 installed to my Ruby root folder (Ruby21/sqlite). I've also got the Sqlite3 gem installed and the installation returns no errors. I can run sqlite from the command prompt. This is the same way I've got it installed on my laptop, which works fine so I'm really at a loss here. Any help appreciated.
This issue is resolved on this link. You basically have to change the require path from
s.require_paths=["lib"]
to
s.require_paths= ["lib/sqlite3_native"]
You can find it in your sqlite3 gemspec file. One example is /usr/local/share/gem/specifications/sqlite3-1.3.7.gemspec or 'C:\Ruby21\lib\ruby\gems\2.1.0\specifications'.
I've just tried installing Ruby on Rails via the RailsInstaller for Windows. All went absolutely fine, until I tried creating my first app. Basically I run
rails new 'first_app'
and it creates all the appropriate files but throws up this error message when trying to run 'bundle install'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:
36:in `require': 193: %1 is not a valid Win32 application. - C:/RailsInstaller
/Ruby1.9.3/lib/ruby/1.9.1/i386-mingw32/openssl.so (LoadError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/openssl.rb:17:in `<top (
required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/https.rb:22:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/remot
e_fetcher.rb:316:in `connection_for'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/remot
e_fetcher.rb:368:in `request'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/remot
e_fetcher.rb:203:in `fetch_http'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/remot
e_fetcher.rb:213:in `fetch_http'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/remot
e_fetcher.rb:231:in `fetch_path'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:265:in `load_specs'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:231:in `block in list'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:227:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:227:in `list'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:150:in `find_matching_with_errors'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:89:in `fetch_with_errors'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/depen
dency_installer.rb:110:in `find_gems_with_sources'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/depen
dency_installer.rb:228:in `find_spec_by_name_and_version'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/depen
dency_installer.rb:259:in `install'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nds/install_command.rb:121:in `block in execute'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nds/install_command.rb:115:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nds/install_command.rb:115:in `execute'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nd.rb:278:in `invoke'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nd_manager.rb:147:in `process_args'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nd_manager.rb:117:in `run'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/gem_r
unner.rb:65:in `run'
from C:/RailsInstaller/Ruby1.9.3/bin/gem:21:in `<main>'
I've tried re-installing but it still pulls up that error.
The relevant error message here is 193: %1 is not a valid Win32 application.
Checkout this answer for a previous question about the same; it explains why the problem happens, and provides suggestions as to how to fix it.
The person who provided the answer - Luis Lavena - has worked extensively to make ruby work well on windows, and is the creator of Ruby Installer for Windows.