Im building a rails news app, Im using Devise for authentication. - I just installed twitter bootstrap - (twbs/bootstrrap-sass) Now when I try and login in or create a new user nothing happens. Here is a copy of my log. Any suggestions?
Started GET "/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"=>"david@email.com", "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)
Here is my 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
Here is a log for a different app that is working:
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)
for some reason when I try and sign up on my new app its not running any sql
you need to whitelist that ip in application.rb or in config/environments/development.rb
class Application < Rails::Application
config.web_console.whitelisted_ips = "10.240.1.18"
end
this document might help https://github.com/rails/web-console#configweb_consolewhitelisted_ips
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.