I'm trying to run Watir for Ruby on Ubuntu 10.04. I've installed Chrome and ChromeDriver on my (displayless) server, and installed the selenium-webdriver Gem. But when I try to create a browser in Watir, I get:
$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'watir-webdriver'
=> true
irb(main):003:0> browser = Watir::Browser.new :chrome
NoMethodError: undefined method `closed?' for nil:NilClass
from /usr/lib/ruby/1.8/net/http.rb:1060:in `request'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/http/default.rb:83:in `response_for'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/http/default.rb:39:in `request'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/bridge.rb:598:in `raw_execute'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/bridge.rb:92:in `create_session'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/chrome/bridge.rb:29:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/common/driver.rb:37:in `new'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/common/driver.rb:37:in `for'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver.rb:65:in `for'
from /usr/lib/ruby/gems/1.8/gems/watir-webdriver-0.5.5/lib/watir-webdriver/browser.rb:35:in `initialize'
from (irb):3:in `new'
from (irb):3
from :0
irb(main):004:0>
Long pause after the "Watir::Browser.new" call, I'm assuming some sort of timeout? Maybe trying to talk with Chromedriver? I'm running these versions of the relevant Gems:
$ gem list
*** LOCAL GEMS ***
addressable (2.3.2)
childprocess (0.3.6)
fastercsv (1.5.5)
ffi (1.2.0, 1.0.11)
libwebsocket (0.1.3)
multi_json (1.3.7, 1.0.4)
rubygems-update (1.8.24)
rubyzip (0.9.9)
selenium-webdriver (2.26.0, 2.18.0)
watir-webdriver (0.5.5)
websocket (1.0.3)
yajl-ruby (1.1.0)
I'm trying to run Chrome headless, and I didn't have an X server running. Xvfb did the trick, and I'm working now:
http://en.wikipedia.org/wiki/Xvfb
http://blog.kagesenshi.org/2007/06/running-x-applications-headless-using.html
Related
Try to use DataMapper on my macbook and got such error:
/Users/roger/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems
/specification.rb:2288:in `raise_if_conflicts':
Unable to activate dm-serializer-1.2.2, because json-2.1.0 conflicts
with json (~> 1.6) (Gem::ConflictError)
I try to uninstall JSON and install new. But if before ruby complain about JSON 1.6 now it complain about 2.10.
What to do I don't know..
Same script on my Ubuntu server work with DataMapper without problem but got Selenium error:
/usr/lib/ruby/2.3.0/net/protocol.rb:158:in `rbuf_fill': Net::ReadTimeout (Net::ReadTimeout)
from /usr/lib/ruby/2.3.0/net/protocol.rb:136:in `readuntil'
from /usr/lib/ruby/2.3.0/net/protocol.rb:146:in `readline'
from /usr/lib/ruby/2.3.0/net/http/response.rb:40:in `read_status_line'
from /usr/lib/ruby/2.3.0/net/http/response.rb:29:in `read_new'
from /usr/lib/ruby/2.3.0/net/http.rb:1437:in `block in transport_request'
from /usr/lib/ruby/2.3.0/net/http.rb:1434:in `catch'
from /usr/lib/ruby/2.3.0/net/http.rb:1434:in `transport_request'
from /usr/lib/ruby/2.3.0/net/http.rb:1407:in `request'
from /usr/lib/ruby/2.3.0/net/http.rb:1400:in `block in request'
from /usr/lib/ruby/2.3.0/net/http.rb:853:in `start'
from /usr/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/remote/http/default.rb:124:in `response_for'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/remote/http/default.rb:78:in `request'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/remote/http/common.rb:61:in `call'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/remote/bridge.rb:170:in `execute'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/remote/bridge.rb:103:in `create_session'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/firefox/marionette/driver.rb:56:in `initialize'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/firefox/driver.rb:33:in `new'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/firefox/driver.rb:33:in `new'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/driver.rb:54:in `for'
from /var/lib/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver.rb:86:in `for'
from selen_serv.rb:19:in `<main>'
Script header:
require 'nokogiri'
require 'selenium-webdriver'
require 'rspec/expectations'
require 'headless'
require 'pp'
require 'json'
require 'rubygems'
require 'data_mapper'
require 'dm-core'
require 'dm-validations'
require 'dm-timestamps'
TEST_DIR = File.expand_path(File.dirname(__FILE__))
TEST_FILES = File.join(TEST_DIR, "test_files")
TEST_OUTPUT = File.join(TEST_DIR, "test_output")
CHROMEDRIVER_FN = File.join(File.absolute_path('..', TEST_DIR), "/usr/local/bin", "chromedriver")
#browser = Selenium::WebDriver.for :firefox
bash-3.2$ bundler
Resolving dependencies...
Bundler could not find compatible versions for gem "json_pure":
In Gemfile:
data_mapper was resolved to 1.2.0, which depends on
dm-serializer (~> 1.2.0) was resolved to 1.2.2, which depends on
json_pure (~> 1.6)
Could not find gem 'json_pure (~> 1.6)', which is required by gem 'dm-serializer (~> 1.2.0)', in any of the sources.
Ruby/Rake NOOB and have inherited set of C# projects that use ruby & rake for build/deploy.
The build quit working last week because of an old gem. In the process of updating all gems to recent versions, I've run into this uninitialized constant problem.
There were no code changes involved and I tried adding "require 'logging'" to setup.rb.
I've been working under the assumption that the problem is in our rake files, but after pounding on this for hours I'm not so sure. I haven't found anyplace in our code that uses the constant.
Any suggestions or help appreciated.
Windows Server 2008 with Ruby 2.0.0.
gem list output:
*** LOCAL GEMS ***
akami (1.2.1)
albacore (0.3.6)
aws-sdk (1.38.0)
bigdecimal (1.2.0)
builder (3.2.2)
bundler (1.6.0)
ffi (1.9.3 x86-mingw32)
gssapi (1.0.3)
gyoku (1.1.1)
httpclient (2.3.4.1)
httpi (0.9.7)
io-console (0.4.2)
json (1.8.1, 1.7.7)
little-plugger (1.1.3)
logging (1.8.2)
mini_portile (0.5.3)
minitest (4.3.2)
multi_json (1.9.2)
nokogiri (1.6.1 x86-mingw32)
nori (1.1.5)
psych (2.0.0)
rack (1.5.2)
rake (0.9.6)
rdoc (4.0.0)
rubyntlm (0.1.1)
rubyzip (0.9.9)
savon (0.9.5)
test-unit (2.0.0.0)
uuidtools (2.1.4)
wasabi (1.0.0)
win32-service (0.8.4)
winrm (1.1.3)
and the rake output:
rake aborted!
uninitialized constant Logging::Logger::INFO
C:/Ruby200/lib/ruby/2.0.0/rake/ext/module.rb:36:in `const_missing'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/albacore-0.3.6/lib/albacore/support/logging.rb:7:in `initialize'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/albacore-0.3.6/lib/albacore/support/failure.rb:7:in `initialize'
C:/Ruby200/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:13:in `initialize'
C:/Ruby200/lib/ruby/2.0.0/psych/nodes/node.rb:35:in `new'
C:/Ruby200/lib/ruby/2.0.0/psych/nodes/node.rb:35:in `to_ruby'
C:/Ruby200/lib/ruby/2.0.0/psych.rb:130:in `load'
C:/build-dir/MV-MB-JOB1/deploy/setup.rb:5:in `block in <top (required)>'
C:/build-dir/MV-MB-JOB1/deploy/setup.rb:5:in `open'
C:/build-dir/MV-MB-JOB1/deploy/setup.rb:5:in `<top (required)>'
C:/build-dir/MV-MB-JOB1/deploy/rakefile.rb:15:in `require_relative'
C:/build-dir/MV-MB-JOB1/deploy/rakefile.rb:15:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rake/rake_module.rb:25:in `load'
C:/Ruby200/lib/ruby/2.0.0/rake/rake_module.rb:25:in `load_rakefile'
C:/Ruby200/lib/ruby/2.0.0/rake/application.rb:604:in `raw_load_rakefile'
C:/Ruby200/lib/ruby/2.0.0/rake/application.rb:89:in `block in load_rakefile'
C:/Ruby200/lib/ruby/2.0.0/rake/application.rb:160:in `standard_exception_handling'
C:/Ruby200/lib/ruby/2.0.0/rake/application.rb:88:in `load_rakefile'
C:/Ruby200/lib/ruby/2.0.0/rake/application.rb:72:in `block in run'
C:/Ruby200/lib/ruby/2.0.0/rake/application.rb:160:in `standard_exception_handling'
C:/Ruby200/lib/ruby/2.0.0/rake/application.rb:70:in `run'
C:/Ruby200/bin/rake:37:in `<main>'
setup.rb:
require "yaml"
#environment = ENV["environment"] || "development"
#version = ENV["version"] || "none"
#configuration = File.open(File.join("environment", #environment, "global_config.yml"), "rb") {|f| YAML::load(f)}
#configuration.merge!({:environment => #environment,
:version => #version,
:repository_path => ENV["repository_path"]})
There seems to be a namespace collision between the WinRM and Albacore gems AND WinRM uses the 'logging' gem, Albacore uses 'logger'. Both define Logger.
Using the following command:
rake -f myTest.rb --trace
This works:
require "winrm"`
require "albacore"
task :default do
end
This does not:
require "albacore"
require "winrm"
task :default do
end
Albacore implements lib\albacore\support\logging.rb:
require 'logger'
module Logging
attr_accessor :logger, :current_log_device
def initialize
create_logger(STDOUT, Logger::INFO)
super()
end
def log_device=(logdev)
level = #logger.level
create_logger(logdev, level)
end
.
.
.
end
WinRm does the following in winrm.rb:
require 'date'
require 'kconv' if(RUBY_VERSION.start_with? '1.9') # bug in rubyntlm with ruby 1.9.x
require 'logging'
module WinRM
Logging.logger.root.level = :info
Logging.logger.root.appenders = Logging.appenders.stdout
end
require 'winrm/helpers/iso8601_duration'
require 'winrm/soap_provider'
Not suggesting this as an appropriate fix, but wrapping the Albacore Logging module in another module, and updating Albacore references to Logging (Albacore::Logging), solves the problem.
Altered lib\albacore\support\logging.rb:
module Albacore
module Logging
.
.
.
end
end
Update:
I opened an Albacore issue. 2.0.0.rc.10, released today, includes a fix for the name collision issue. However, migrating from pre-2.0 Albacore to 2.0.0 is not pain-free because some of the task types have been generalized. Albacore nunit has been replaced by task_runner. Albacore msbuild is now simply 'build'.
The conflict can also be solved by moving the require down in to the task that needs it, as such:
require "albacore"
task :default do
...
end
task :some_winrm_task do
require "winrm"
...
end
I'm trying to get started with Mongoid in a Sinatra app, but it looks like I'm running into dependency issues. If it helps, I'm on a Macbook Pro using RVM and running Ruby 1.9.3.
Here are the errors I'm getting after running $ ruby config.ru:
/Users/duncanmalashock/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts': Unable to activate mongoid-3.0.23, because activemodel-4.0.0 conflicts with activemodel (~> 3.1) (Gem::LoadError)
from /Users/duncanmalashock/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/specification.rb:746:in `activate'
from /Users/duncanmalashock/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate'
from /Users/duncanmalashock/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems.rb:209:in `try_activate'
from /Users/duncanmalashock/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from /Users/duncanmalashock/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /Users/duncanmalashock/Penumbra/penumbra.rb:4:in `<top (required)>'
from /Users/duncanmalashock/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/duncanmalashock/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from config.ru:2:in `<main>'
Can anyone help?
Here are the files involved:
mongoid.yml:
development:
sessions:
default:
database: mongoid
hosts:
- localhost:27017
config.ru:
require 'sinatra'
require './penumbra'
run Sinatra::Application
Gemfile:
source :rubygems
source :rubyforge
# Thin Server
gem 'thin'
# Sinatra
gem 'sinatra'
gem 'sinatra-contrib', :require => 'sinatra/multi_route'
gem 'sinatra-partial', :require => 'sinatra/partial'
gem 'sinatra-reloader'
# MongoDB
gem "mongoid"
# Shopify
gem 'shopify_api'
penumbra.rb:
require 'sinatra'
require 'shopify_api'
require 'mongo'
require 'mongoid'
require 'json'
require "sinatra/reloader" if development?
Mongoid.load!("./mongoid.yml", :production)
def isactivepage(link_name)
if (link_name == #page_name)
return ' activelink'
else return ''
end
end
get '/' do
#page_name = "Home"
erb :"pages/index"
end
get '/about' do
#page_name = "About"
erb :"pages/about"
end
After running $ bundle exec rackup:
/Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/mongoid-1.0.6/lib/mongoid.rb:68:in `method_missing': undefined method `load!' for #<Mongoid::Config:0x007fc0838cb1d0> (NoMethodError)
from /Users/duncanmalashock/Penumbra/penumbra.rb:9:in `<top (required)>'
from /Users/duncanmalashock/Penumbra/config.ru:2:in `require'
from /Users/duncanmalashock/Penumbra/config.ru:2:in `block in <main>'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /Users/duncanmalashock/Penumbra/config.ru:in `new'
from /Users/duncanmalashock/Penumbra/config.ru:in `<main>'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/bin/rackup:23:in `load'
from /Users/duncanmalashock/.rvm/gems/ruby-1.9.3-p448/bin/rackup:23:in `<main>'
You have a Gemfile, but you’re not starting your app using Bundler, and that’s why you have the conflict.
The current version of shopify_api (3.0.3) has a dependency on activemodel via activeresource with the version requirements set to >=3.0.0. On your system you have Rails 4 installed, so activemodel 4.0 is loaded.
The current version of mongoid also has a dependency on activemodel, but this time the version requirement is ~> 3.2.
These two version requirements are not compatible, so you get the error activemodel-4.0.0 conflicts with activemodel (~> 3.1).
To fix it, simply use Bundler to start your app. You say you are running with $ ruby config.ru but this isn’t the correct way to use a config.ru (you would get errors later even if you fixed your dependency issues). You should use rackup. In this case you should run:
$ bundle exec rackup
I have installed JRuby 1.6.7.2 (64bit), and the JDK 1.7.x (64-bit) on my Windows 7 machine. Right now I'm just trying to launch a browser (Firefox 13.0) using Watir but I keep getting an HTTP error that seems to be coming internally from JRuby + gems. I have installed the gems using the following commands:
jgem install watir-webdriver
jgem install rspec
jgem install capybara
jgem install page-object
jgem install bundler
jgem install jruby-jars
Here is the stacktrace error I get when I try to open a browser using Watir:
C:\Windows\System32>jirb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'watir-webdriver'
=> true
irb(main):003:0> b = Watir::Browser.start("http://www.google.com", :firefox)
[WARNING] MultiJson is using the default adapter (ok_json). We recommend loading
a different JSON library to improve performance.
ArgumentError: HTTP request path is empty
from C:/Ruby/jruby-1.6.7.2/lib/ruby/1.8/net/http.rb:1476:in `initialize'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/1.8/net/http.rb:1594:in `initialize'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/selenium-webdriver-2.2
2.2/lib/selenium/webdriver/remote/http/default.rb:64:in `new_request_for'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/selenium-webdriver-2.2
2.2/lib/selenium/webdriver/remote/http/default.rb:34:in `request'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/selenium-webdriver-2.2
2.2/lib/selenium/webdriver/remote/http/default.rb:57:in `request'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/selenium-webdriver-2.2
2.2/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/selenium-webdriver-2.2
2.2/lib/selenium/webdriver/remote/bridge.rb:598:in `raw_execute'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/selenium-webdriver-2.2
2.2/lib/selenium/webdriver/remote/bridge.rb:92:in `create_session'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/selenium-webdriver-2.2
2.2/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/selenium-webdriver-2.2
2.2/lib/selenium/webdriver/firefox/bridge.rb:28:in `initialize'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/selenium-webdriver-2.2
2.2/lib/selenium/webdriver/common/driver.rb:31:in `for'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/selenium-webdriver-2.2
2.2/lib/selenium/webdriver.rb:65:in `for'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.1/
lib/watir-webdriver/browser.rb:35:in `initialize'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.1/
lib/watir-webdriver/browser.rb:18:in `start'
from (irb):3:in `evaluate'
from org/jruby/RubyKernel.java:1083:in `eval'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/1.8/irb.rb:158:in `eval_input'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/1.8/irb.rb:271:in `signal_status'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1410:in `loop'
from org/jruby/RubyKernel.java:1183:in `catch'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/1.8/irb.rb:154:in `eval_input'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1183:in `catch'
from C:/Ruby/jruby-1.6.7.2/lib/ruby/1.8/irb.rb:70:in `start'
from C:\Ruby\jruby-1.6.7.2\bin\jirb:13:in `(root)'irb(main):004:0>
I have the selenium webdrivers ie & chrome added to my classpath. When I execute this command with ie or chrome I get a similar HTTP error. Is this a fix I have to do manually to the gem files?
I had the same error with the watir-webdriver gem.
The problem were the http proxy settings and the solution was to add the no_proxy env before the code.
ENV['no_proxy'] = "127.0.0.1"
I hope that can help you!
I'm quite new at all of this stuff, so I may have made some simple (and/or horribly disastrous) mistakes. In what follows, I describe the web of issues I'm confronting, but I get the impression that the "bundle config" error is at the root. Here's what I've been facing:
I've been trying to set up a personal wiki with Wagn's interesting arrangement. I've been trying to install version 1.8 according to the instructions, but I have been for more than a week on the 3rd step, "Configure", which instructs me to run this bundle command:
$ bundle exec rake wagn:install
I'm running OS X 10.6.8, MySQL Ver 14.14 Distrib 5.5.20, Ruby 1.9.3, Rails 2.3.11, Bundler 1.0.21, and Rake 0.9.2.2 (think that's everything relevant).
Initially, I was getting this error:
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
which I (hopefully) overcame by making the repairs suggested by Matthew Mceachen.
I have now been stumped on the following error, which is returned when I try to run the above cited "bundle exec rake" command (user name replaced with 'ME'):
xxxxxxxxxxxxxxxx:wagn xxxxxxxxx$ bundle exec rake wagn:install
/Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/settings.rb:11:in `[]': undefined method `[]' for false:FalseClass (NoMethodError)
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler.rb:261:in `configure_gem_home_and_path'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler.rb:82:in `configure'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler.rb:136:in `definition'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler.rb:126:in `load'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/cli.rb:340:in `exec'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:in `start'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/bin/bundle:13:in `<top (required)>'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0/bin/bundle:19:in `load'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0/bin/bundle:19:in `<main>'
I've tried to check this against the bundler configurations, but receive the following error when I use "$ bundle config":
XXXXXXXXXXXXX:wagn XXXXXXXXX$ bundle config
Settings are listed in order of priority. The top value will be used.
/Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/settings.rb:27:in `block in all': invalid byte sequence in UTF-8 (ArgumentError)
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/settings.rb:27:in `select'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/settings.rb:27:in `all'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/cli.rb:375:in `config'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:in `start'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/bin/bundle:13:in `<top (required)>'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0/bin/bundle:19:in `load'
from /Users/ME/.rvm/gems/ruby-1.9.3-p0/bin/bundle:19:in `<main>'
Tho I've found several discussions dealing with erros citing "invalid byte sequences", none of them seem to apply to my situation in any clear way. The most common response seemed to be to check and the locale and make sure everything is assigned to UTF-8, which I did. $ locale now returns this:
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
My gem list, for good measure:
actionmailer (3.2.1, 2.3.11)
actionpack (3.2.1, 2.3.11)
activemodel (3.2.1)
activerecord (3.2.1, 2.3.11)
activeresource (3.2.1, 2.3.11)
activesupport (3.2.1, 2.3.11)
arel (3.0.0)
aws-s3 (0.6.2)
builder (3.0.0)
bundler (1.0.21 ruby)
erubis (2.7.0)
hike (1.2.1)
hoptoad_notifier (2.4.11)
htmlentities (4.2.4)
i18n (0.6.0)
image_science (1.2.1)
journey (1.0.1)
json (1.6.5, 1.4.6)
macaddr (1.0.0)
mail (2.4.1)
mime-types (1.17.2, 1.16)
multi_json (1.0.4)
mysql (2.8.1)
newrelic_rpm (3.3.1, 3.1.0)
polyglot (0.3.3)
rack (1.4.1, 1.1.3, 1.1.2)
rack-cache (1.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.1, 2.3.11)
railties (3.2.1)
rake (0.9.2.2, 0.9.2)
rdoc (3.12)
ruby-mysql (2.9.4)
RubyInline (3.8.6)
spork (0.9.0)
sprockets (2.1.2)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.31)
uuid (2.2.0)
xml-simple (1.1.1, 1.1.0)
ZenTest (4.6.2, 4.5.0)
Any insight you might be able to provide would be very helpful. Even if I seem to be pointed in the completely wrong direction or whatever, a few words to point me aright would be gratefully received. Thanks in advance!