can't convert Pathname into String #2

Open
ngryman opened this Issue Oct 15, 2011 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

ngryman commented Oct 15, 2011

Hi,

I'm using unittest_js in the Rakefile of my project.
I've got the following error while requiring unittest_js : can't convert Pathname into String.

The error comes from these requires in unittest_js.rb :

require File.expand_path(File.join(File.dirname(__FILE__), 'unittest_js', 'dir_pathname'))
require File.expand_path(File.join(File.dirname(__FILE__), 'unittest_js', 'builder'))
require File.expand_path(File.join(File.dirname(__FILE__), 'unittest_js', 'webrick_runner'))
require File.expand_path(File.join(File.dirname(__FILE__), 'unittest_js', 'browsers'))

I've fixed the error by simplifying them, as you do $:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'unittest_js')) :

require 'dir_pathname'
require 'builder'
require 'webrick_runner'
require 'browsers'

Here is my version of ruby :

$ ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

I am not a ruby expert, but if this is correct, can you just update this file (I'm not going to make a pull request for this).
Thanks a lot!

I am also gatting same error using opentok.... at

@api_key = "XXXXX"
api_secret = "XXXX"

@opentok = OpenTok::OpenTokSDK.new @api_key, api_secret
@opentok.api_url = 'https://staging.tokbox.com/hl'

@session = @opentok.create_session request.remote_addr # this line<--------------------------------------------

@token = @opentok.generate_token :session_id => @session
After running code I got:

TypeError in ShowsController#action
can't convert Pathname into String
I'm using:

ruby -version : ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
rails -version: 3.0.9
if u have some solution plz reply .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment