Heroku rake db:migrate aborts; interning empty string... why? - database

Ok I've tried searching this site for other similar questions, but those that come close have no answers, so hopefully a rails/heroku guru can help me out.
I've created a basic rails app (I'm learning) and managed to have it run on my home machine perfectly. But when I push it to Heroku and type:
heroku rake db:migrate I get the following error/s:
c:\iltapp>heroku rake db:migrate --trace
rake aborted!
interning empty string
/app/.bundle/gems/ruby/1.8/gems/actionpack-3.0.5/lib/action_dispatch/routing/mapper.rb:1309:in `to_sym'
/app/.bundle/gems/ruby/1.8/gems/actionpack-3.0.5/lib/action_dispatch/routing/mapper.rb:1309:in `action_path'
/app/.bundle/gems/ruby/1.8/gems/actionpack-3.0.5/lib/action_dispatch/routing/mapper.rb:1304:in `path_for_action'
/app/.bundle/gems/ruby/1.8/gems/actionpack-3.0.5/lib/action_dispatch/routing/mapper.rb:1159:in `match'
/app/.bundle/gems/ruby/1.8/gems/actionpack-3.0.5/lib/action_dispatch/routing/mapper.rb:1360:in `match'
/app/config/routes.rb:11
/app/.bundle/gems/ruby/1.8/gems/actionpack-3.0.5/lib/action_dispatch/routing/route_set.rb:233:in `instance_exec'
/app/.bundle/gems/ruby/1.8/gems/actionpack-3.0.5/lib/action_dispatch/routing/route_set.rb:233:in `draw'
/app/config/routes.rb:1
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:235:in `load'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:235:in `load'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:227:in `load_dependency'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:235:in `load'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:127:in `reload_routes!'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:127:in `each'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:127:in `reload_routes!'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:120:in `routes_reloader'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/file_update_checker.rb:32:in `call'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/file_update_checker.rb:32:in `execute_if_updated'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application/finisher.rb:51
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application/finisher.rb:52:in `call'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application/finisher.rb:52
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `instance_exec'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `run'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:50:in `run_initializers'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `each'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `run_initializers'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:134:in `initialize!'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:77:in `send'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:77:in `method_missing'
/app/config/environment.rb:5
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:103:in `require'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:103:in `require_environment!'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.5/lib/rails/application.rb:216:in `initialize_tasks'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/ruby1.8.7/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/ruby1.8.7/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/usr/ruby1.8.7/bin/rake:19:in `load'
/usr/ruby1.8.7/bin/rake:19
(in /app)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
Sorry for the long paste, but to be honest I don't know which part of that might me informative. What I have noticed and I hope this isnt the case is I have Ruby 1.9.2 & Rails 3 installed and I see heroku mentions 1.8 above. Would my code be totally incompatible with heroku if I stay with my version or if that is the issue, is there a way around it?
Update #1: I tried #Svilen's suggestion of reseting the db with herolu rake db:reset and get the same error and some new ones, which may or may not be related. And to clarify I am runnign it on a Bamboo Stack (bamboo-ree-1.8.7) Heres what i get:
Couldn't drop hvjiqvwyxn : #<ActiveRecord::StatementInvalid: PGError: ERROR: must be owner of database hvjiqvwyxn
: DROP DATABASE IF EXISTS "hvjiqvwyxn">
hvjiqvwyxn already exists
rake aborted!
interning empty string
Update #2: As per #Svilen's mention of the stacks I have migrated to bamboo-mri-1.9.2 where ruby 1.9.2 (and correct me if I'm wrong) supports "interning an empty string"
Any answers would be much appreciated.

Heroku support Ruby 1.9.2 only on the Bamboo stack. You can check which stack you are using by typing heroku stack. If you are on the old one - Aspen - you can easily move to Bamboo. Check this article in Heroku's Dev Center: http://devcenter.heroku.com/articles/stack
If that's not the case, try resetting the database and forcing all migrations (note: you will lose all existing data!) with heroku rake db:reset. You can also try restarting Heroku beforehand with heroku restart.
If you noticed anything strange during your git push to heroku, it might be relevant to the problem and worth updating your question with additional data.

Related

Installing compass or FFI not working

I've tried installing compass and ffi on osx but get the same error.
I've reconfigured and reinstalled ruby, I've installed Xcode command line tools, I've rebooted my machine, nothing seems to fix the exact same error every single time. I'm about to wipe my machine and start anew, I have no idea why I can't get past this error when trying gem install compass:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20160508-18749-v694wb.rb extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1038:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:889:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:888:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1037:in `have_header'
from extconf.rb:16:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/ffi-1.9.10/mkmf.log
extconf failed, exit code 1

How to use selenium-webdriver to automate CEF3 application

I'm using selenium-webdriver to automate a CefSharp (CEF3) based application, but kept getting errors.
I use the following Ruby scripts to launch the CEF application:
require "selenium-webdriver"
cefpath = 'C:\mypathto\cefapp.exe'
Selenium::WebDriver::Chrome.path = cefpath
browser = Selenium::WebDriver.for :chrome
......
When running it, it does open the CEF application (a container of Chrome), but then gets stuck with the following error:
C:/Ruby200/lib/ruby/2.0.0/net/protocol.rb:158:in `rescue in rbuf_fill': Net::ReadTimeout (Net::ReadTimeout)
from C:/Ruby200/lib/ruby/2.0.0/net/protocol.rb:152:in `rbuf_fill'
from C:/Ruby200/lib/ruby/2.0.0/net/protocol.rb:134:in `readuntil'
from C:/Ruby200/lib/ruby/2.0.0/net/protocol.rb:144:in `readline'
from C:/Ruby200/lib/ruby/2.0.0/net/http/response.rb:39:in `read_status_line'
from C:/Ruby200/lib/ruby/2.0.0/net/http/response.rb:28:in `read_new'
from C:/Ruby200/lib/ruby/2.0.0/net/http.rb:1406:in `block in transport_request'
from C:/Ruby200/lib/ruby/2.0.0/net/http.rb:1403:in `catch'
from C:/Ruby200/lib/ruby/2.0.0/net/http.rb:1403:in `transport_request'
from C:/Ruby200/lib/ruby/2.0.0/net/http.rb:1376:in `request'
from C:/Ruby200/lib/ruby/2.0.0/net/http.rb:1369:in `block in request'
from C:/Ruby200/lib/ruby/2.0.0/net/http.rb:852:in `start'
from C:/Ruby200/lib/ruby/2.0.0/net/http.rb:1367:in `request'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/default.rb:83:in `response_for'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/default.rb:39:in `request'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:634:in `raw_execute'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:99:in `create_session'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/chrome/bridge.rb:29:in `initialize'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/driver.rb:37:in `new'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/driver.rb:37:in `for'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver.rb:67:in `for'
Any idea why?
Thanks a lot.
Make sure you use an up-to-date ChromiumDriver/Selenium versions. According to this:
https://code.google.com/p/chromiumembedded/wiki/UsingChromeDriver
CEF works fine with ChromeDriver version 2.14 and Selenium 2.44.0.

Vagrant Error, The box failed to unpackage properly

I have a question for help that I could not find on any of these topics already.
I am trying to implement vagrant against my pre-existing virtual box. Most of the topics online right now are referring to using a box from vagrant cloud, or building one from scratch etc. My issue is I have an already built virtual box using Virtualbox as the provider specifically 1.4.3 as the version. The box is 124GB so remaking it is not exactly ideal. I have the vagrant config file set to locate the virtual box at path /users/desktop/foldername/filename.vbox. Every time it tries to add the box I get the error
"The box failed to unpackage properly. Please verify that the box file you're trying to add is not corrupted and try again. The output from attemtping to unpackage (if any):
Bsdtar: Error opening archive: Unrecognized archive format."
My knowledge is that this is because Vagrant is looking to add a .tar file and the file is not a tar extension.
Your supposed to be able to configure vagrant file to recognize the provider which I have done as well. Mine is set to
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
But no matter what I try I'm always getting the error above.
One thing to note is I'm not sure how to go about providing the metadata.json file, or how I can find that to edit it. Perhaps that is my problem? I have the latest version of vagrant so that is not the issue.
Any assistance would be greatly appreciated.
I have tried the vagrant package and below is my error I'm getting Please see if you may be able to provide further assistance.
I tried what you have suggested and here is the error message that I'm getting. I greatly appreciate your help.
nokeys$ vagrant package --base Dev_Clonea --output /users/nokeys/desktop/Dev_Clone/Dev_Clone.vbox
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:306:in `id=': undefined method `children' for nil:NilClass (NoMethodError)
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:438:in `state'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/action/created.rb:11:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/call.rb:43:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:196:in `action_raw'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:173:in `block in action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:in `lock'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/commands/package/command.rb:83:in `package_vm'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/commands/package/command.rb:66:in `package_base'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/commands/package/command.rb:42:in `execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/cli.rb:42:in `execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:252:in `cli'
from /Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant:166:in `<main>'
vagrant package --base <name of vm> --output <path>.box
Lets say you virtual machine is named 'my_vm' and you want to drop it into the home directory
vagrant package --base my_vm --output ~/my_vm.box
Vagrant will package your virtual machine into a base box. Whatever you name the box with the output flag, will be the name you use in your vagrantfile.

JRuby Watir phantomjs exception Unknown error (Windows says "The operation completed successfully.", but it did not.)

Trying to use JRuby with watir-webdriver over the phantomjs driver and get the exception below. Works with :chrome and :firefox but fails with :phantomjs. Tried this on a colleagues machine too and if failed. It is possible to use webdriver/phantomjs over JRuby?
Here are the details:
jruby 1.7.12 (1.9.3p392) 2014-04-15 643e292 on Java HotSpot(TM) 64-Bit Server VM 1.7.0-b147 [Windows 7-amd64]
watir-webdriver (0.6.9)
phantomjs -v
1.9.7
irb(main):001:0> require 'watir-webdriver'
=> true
irb(main):002:0> b = Watir::Browser.new :phantomjs
ChildProcess::Error: Unknown error (Windows says "The operation completed successfully.", but it did not.)
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/childprocess- 0.5.3/lib/childprocess/windows/lib.rb:325:in `handle_for'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/childprocess-0.5.3/lib/childprocess/jruby.rb:48:in `windows_handle_for'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/childprocess-0.5.3/lib/childprocess/windows/lib.rb:306:in `handle_for'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/childprocess-0.5.3/lib/childprocess/windows/process_builder.rb:137:in `std_stream_hadle_for'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/childprocess-0.5.3/lib/childprocess/windows/process_builder.rb:109:in `setup_io'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/childprocess-0.5.3/lib/childprocess/windows/process_builder.rb:32:in `start'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/childprocess-0.5.3/lib/childprocess/windows/process.rb:68:in `launch_process'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/childprocess-0.5.3/lib/childprocess/abstract_process.rb:82:in `start'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/phantomjs/service.rb:42:in `start'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/phantomjs/bridge.rb:20:in `initialie'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/common/driver.rb:45:in `for'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver.rb:67:in `for'
from C:/jruby-1.7.12/lib/ruby/gems/shared/gems/watir-webdriver-0.6.9/lib/watir-webdriver/browser.rb:46:in `initialize'
from (irb):2:in `evaluate'
from org/jruby/RubyKernel.java:1101:in `eval'
from org/jruby/RubyKernel.java:1501:in `loop'
from org/jruby/RubyKernel.java:1264:in `catch'
from org/jruby/RubyKernel.java:1264:in `catch'
from C:/jruby-1.7.12/bin/jirb:13:in `(root)'
This appears to be related to trying to run the child-process gem on Jruby. This is the first time I have personally seen a problem with that, and I've run a lot of stuff using watir-webdriver (and hence webdriver) on jruby. But I had not tried using phantomJS for my browser.
When I try this with ruby 1.9.3 it works for me
C:\Rubies>ruby --version
ruby 1.9.3p551 (2014-11-13) [i386-mingw32]
C:\Rubies>irb
irb(main):001:0> require 'watir-webdriver'
=> true
irb(main):002:0> b = Watir::Browser.new :phantomjs
=> #<Watir::Browser:0x..f887d0e36 url="about:blank" title="">
irb(main):003:0> b.goto "http://google.com"
=> "http://www.google.com/"
irb(main):004:0> puts b.title
Google
=> nil
Using Windows 8, When I tried it with Jruby, both the current release 1.7.19 and the pre-release of 9.0.0 I got the same error you did. Ruby 1.9.3 worked properly as you see above. I also tried 64 bit versions of Ruby 2.0 (2.0.0p598) and 2.1.5 (2.1.5p273) and it worked fine. (although for both of those, you may need to manually update rubygems if you get a ssl error trying to install or update gems)
I really do not know if the problem is jruby, or the child-process gem, so I'm not sure where a bug should be filed to get this fixed. in the meantime if you want to use phantomJS as your browser, I suggest moving off jruby until the cause of the fault can be tracked down and fixed.
I'm going to edit the tags for the question slightly to see if we can get attention of any experts with Jruby or the gem in question.
PS for a windows user, since PIC is now unsupported and developent on RVM 2.0 has just started, I recommend looking at URU as a means to swiftly move between ruby versions.

RSolr::Error::Http - 404 Not Found

I got the following error when i tried to run "rake sunspot:solr:reindex". Does anyone has idea how to fix this? It used to be running fine until recently.
RSolr::Error::Http - 404 Not Found
Error: Not Found
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Place</query></delete>"
Backtrace: /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.9/lib/rsolr/client.rb:268:in `adapt_response'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.9/lib/rsolr/client.rb:175:in `execute'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.9/lib/rsolr/client.rb:161:in `send_and_receive'
/usr/local/rvm/gems/ruby-2.0.0-p247/bundler/gems/sunspot-d013ad3c9f86/sunspot_rails/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument'
/usr/local/rvm/gems/ruby-2.0.0-p247/bundler/gems/sunspot-d013ad3c9f86/sunspot_rails/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
Full error code at https://gist.github.com/DerekChia/36ebe381451b2c4cf18d
I am new to solr and had the same issue getting it working in development. When I ran everything as sudo, it started up with no problems:
$ sudo bundle exec rake sunspot:solr:start
$ sudo bundle exec rake sunspot:solr:reindex
I could then view the solr server at http://localhost:8982/solr
So it looks like a permissions issue to avoid having to run it as root.

Resources