Dropbox Ruby API を使用したいので、gem をインストールしました。Dropbox セッションを作成しようとすると、次のメッセージが表示されました。
初期化されていない定数 DropboxController::Dropbox
この API を使用したい場合、gem をインストールする以外に何かすることはありますか?
コードは次のとおりです。
def authorize
if params[:oauth_token] then
dropbox_session = Dropbox::Session.deserialize(session[:dropbox_session])
dropbox_session.authorize(params)
session[:dropbox_session] = dropbox_session.serialize # re-serialize the authenticated session
redirect_to :action => 'upload'
else
dropbox_session = Dropbox::Session.new('your_consumer_key', 'your_consumer_secret')
session[:dropbox_session] = dropbox_session.serialize
redirect_to dropbox_session.authorize_url(:oauth_callback => url_for(:action => 'authorize'))
end
end