1

在rails中运行以下代码时出现错误:

@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
4

0 回答 0