TypeError:无法将Pathname转换为String:Ruby

时间:2011-12-08 13:32:17

标签: ruby-on-rails ruby typeerror pathname

我在以下行中的代码中运行以下代码时遇到错误:

@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

运行代码后我得到了:

TypeError in ShowsController#action
can't convert Pathname into String

我正在使用:

ruby -version : ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
rails -version: 3.0.9
gem -version: 1.7.2

0 个答案:

没有答案