私はRubyの初心者です。私はこれを行う際に、今http://udooz.net/blog/2011/02/facebook-app-using-rails-koala/
Rubyの初期化されていない定数LoginController。
:私は、このチュートリアルに従うことでインストールレールは、コントローラを生成
レールは、コントローラのホーム・インデックス
を生成し、私はこのエラーを取得する:
/home/hiccup-pro/Documents/qstack/config/environment.rb:8:in `<top (required)>': undefined local variable or method `config' for main:Object (NameError)
from /home/hiccup-pro/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/application.rb:103:in `require'
from /home/hiccup-pro/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/application.rb:103:in `require_environment!'
from /home/hiccup-pro/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/commands.rb:25:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
私はそれを修正しました。そのバグは残念ですが、今は違うバグがあります:初期化されていない定数LoginControllerです。私はちょっとグーグルで調べて、環境.rbにconfig。*を記述してはならないことを知った。 はとにかく、 これはだから私のenvironment.rbに
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
Qack::Application.initialize!
config.action_controller.allow_forgery_protection = false
で、なぜ私はこのuninitialized constant LoginController
エラーが出るのですか?あなたのenvironment.rbにを見ずに
environment.rbファイルを投稿できますか? –
また、どのバージョンのRailsを使用していますか? –
私はFacebookのアプリケーションを統合する際にこのような問題に直面しましたが、修正できませんでした。その後、私は 'facebooker2' gemを使用して終了しました... –