2017-07-19 78 views
0

Im建立一個rails新聞應用程序,我使用Devise進行身份驗證。 - 我剛剛安裝了twitter bootstrap - (twbs/bootstrrap-sass)現在,當我嘗試登錄或創建新用戶時,什麼也沒有發生。這是我的日誌的副本。有什麼建議麼?Rails Bootstrap打破設計

Started GET "https://stackoverflow.com/users/sign_in? 
utf8=%E2%9C%93&authenticity_token=aVBlvsx4myc%2BP91qvVF4OENxrq5RMMtXqZyZD%2Bk3USROHJxoQ5LHfiuRwUGKzypB178miOD5pcrUpXOwkDeAYg%3D%3D&user%5Bemail%5D=david%40email.com&user%5Bpassword%5D=[FILTERED]&user%5Bremember_me%5D=0&commit=Log+in" for 10.240.1.18 at 2017-07-19 11:56:18 +0000 
Cannot render console from 10.240.1.18! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255 
Processing by Devise::SessionsController#new as HTML 
    Parameters: {"utf8"=>"✓", "authenticity_token"=>"aVBlvsx4myc+P91qvVF4OENxrq5RMMtXqZyZD+k3USROHJxoQ5LHfiuRwUGKzypB178miOD5pcrUpXOwkDeAYg==", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Log in"} 
    Rendering devise/sessions/new.html.erb within layouts/application 
    Rendered devise/shared/_links.html.erb (1.2ms) 
    Rendered devise/sessions/new.html.erb within layouts/application (5.5ms) 
    Rendered partials/_jumbotron.html.erb (0.7ms) 
Completed 200 OK in 325ms (Views: 74.3ms | ActiveRecord: 0.0ms) 

這裏是我的application.rb中

require_relative 'boot' 

require 'rails/all' 

# Require the gems listed in Gemfile, including any gems 
# you've limited to :test, :development, or :production. 
Bundler.require(*Rails.groups) 

module Newsroom 
    class Application < Rails::Application 
[x] config.web_console.whitelisted_ips = '10.240.1.18" 

    # Initialize configuration defaults for originally generated Rails version. 
    config.load_defaults 5.1 

    # Settings in config/environments/* take precedence over those specified here. 
    # Application configuration should go into files in config/initializers 
    # -- all .rb files in that directory are automatically loaded. 

    end 
    end 
end 

這裏是一個日誌不同的應用程序,是工作:

Started GET "/" for 10.240.1.4 at 2017-07-19 12:35:47 +0000 
Cannot render console from 10.240.1.4! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255 
Processing by SiteController#home as HTML 
    Rendering site/home.html.erb within layouts/application 
    Rendered site/home.html.erb within layouts/application (0.4ms) 
    User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 2], ["LIMIT", 1]] 
Completed 200 OK in 30ms (Views: 28.9ms | ActiveRecord: 0.3ms) 

由於某種原因,當我嘗試和註冊我的新的應用程序它沒有運行任何sql

回答

0

你需要白名單ip在application.rb或在config/environments/development.rb

class Application < Rails::Application 
    config.web_console.whitelisted_ips = "10.240.1.18" 
end 

該文件可能有助於 https://github.com/rails/web-console#configweb_consolewhitelisted_ips

+0

您好,感謝這麼多。嗯,它似乎並不喜歡那樣,它不是閱讀'結束' – LiffeyD

+0

你回答被切斷,它是否工作,什麼是emm,新的錯誤是什麼? – maverick5

+0

嘿,對不起。我不確定發生了什麼事。我得到'未終止的字符串符合文件結尾 - 語法錯誤,意外的輸入結束,期待關鍵字結束。一切正常,全部縮進。由於某種原因,它沒有閱讀'結束' – LiffeyD