Cannot render console

Hello fellow campers. I am doing my best to learn as much as I can before I start applying for a developer job.I am currently building a saasapp using cloud9 IDE.I have successfully built a blogging app with ease.

I have coded the homepage,about and now on contact form.After creating a ' new.html.erb' file from here: app/views/contacts/new.html.erb,my form does not shrink to col-md-4 size as i specified in the code for bootstrap.

When i start the server on so i can preview my app,i get this logging error at the terminal: 'Cannot render console from! Allowed networks:, ::1, '.How do i make bootstrap to shrink my form?Thanks.

This should help:

1 Like

Thank you Sir.However,I whitelisted the console but this is the error that am getting:

Started GET "/contacts/new" for at 2017-10-29 04:21:01 +0000
Cannot render console from! Allowed networks:,, ::1
Processing by ContactsController#new as HTML
  Rendering contacts/new.html.erb within layouts/application
  Rendered contacts/new.html.erb within layouts/application (2.6ms)
Completed 200 OK in 43ms (Views: 42.2ms | ActiveRecord: 0.0ms)

This is after writing this code at development.rb file like this:

Rails.application.configure do
  class Application < Rails::Application
    config.web_console.whitelisted_ips = ''
  # Settings specified here will take precedence over those in config/application.rb.

  # In the development environment your application's code is reloaded on
  # every request. This slows down response time but is perfect for development
  # since you don't have to restart the web server when you make code changes.
  config.cache_classes = false

  # Do not eager load code on boot.
  config.eager_load = false

  # Show full error reports.
  config.consider_all_requests_local = true

  # Enable/disable caching. By default caching is disabled.
  if Rails.root.join('tmp/caching-dev.txt').exist?
    config.action_controller.perform_caching = true

    config.cache_store = :memory_store
    config.public_file_server.headers = {
      'Cache-Control' => 'public, max-age=172800'
    config.action_controller.perform_caching = false

    config.cache_store = :null_store

  # Don't care if the mailer can't send.
  config.action_mailer.raise_delivery_errors = false

  config.action_mailer.perform_caching = false

  # Print deprecation notices to the Rails logger.
  config.active_support.deprecation = :log

  # Raise an error on page load if there are pending migrations.
  config.active_record.migration_error = :page_load

  # Debug mode disables concatenation and preprocessing of assets.
  # This option may cause significant delays in view rendering with a large
  # number of complex assets.
  config.assets.debug = true

  # Suppress logger output for asset requests.
  config.assets.quiet = true

  # Raises error for missing translations
  # config.action_view.raise_on_missing_translations = true

  # Use an evented file watcher to asynchronously detect changes in source code,
  # routes, locales, etc. This feature depends on the listen gem.
  config.file_watcher = ActiveSupport::EventedFileUpdateChecker

And this is the form that i expect to render on the screen with 4 columns,but it isn't doing so:

<div class="container">
  <div class="row">
    <h3 class="text-center">Contact Us</h3>
    <div class="col-md-4 col-md-offset-4">
      <div class="well">
        <%= form_for "/contacts" do |f| %>
        <div class="form-group">
          <%= f.label :name %>
          <%= f.text_field :name, class: 'form-control' %>
        <div class="form-group">
          <%= f.label :email %>
          <%= f.text_field :email, class: 'form-control' %>
        <div class="form-group">
        <%= f.label :comments %>
        <%= f.text_area :comments, class: 'form-control' %>
        <%= f.submit 'Submit', class: 'btn btn-default' %>
        <% end %>

Sorry for bothering but i have successfully pushed two branches to git,that is home page,about page but now the contact_form is really draining my energy.Could there be a problem with bootstrap gem?

And this is my Gem file:

source ''

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.0.0'

# Use Puma as the app server
gem 'puma', '3.4.0'
# Use SCSS for stylesheets
gem 'sass-rails', '5.0.6'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '3.0.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '4.2.1'
# See for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails', '4.1.1'
# Turbolinks makes navigating your web application faster. Read more:
gem 'turbolinks', '5.0.0'
# Build JSON APIs with ease. Read more:
gem 'jbuilder', '2.5.0'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

#Use Twitter Bootstrap library for front-end UI and Layout
gem 'bootstrap-sass', '3.3.7'

#Use Font Awesome sass gem for adding icons
gem 'font-awesome-sass', '4.6.2'

group :development, :test do
  #Use sqlite3 as the database for Active Record
  gem 'sqlite3'
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platform: :mri

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console'
  gem 'listen', '3.0.5'
  # Spring speeds up development by keeping your application running in the background. Read more:
  gem 'spring'
  gem 'spring-watcher-listen', '2.0.0'

group :production do
  #Use the PostgreSQL gem for Heroku  production servers
  gem 'pg', '0.18.4'

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
ruby '2.3.0'

From this error message it looks like you set wrong IP.
I don’t know Ruby, so I can’t really help more, but try to look at link to Stackoverflow from the link I posted above.
There are several ways how to set IP or disable the console.

1 Like

@korzo Thanks,does it mean that i am in private network?I read the information from the link you provided and after doing what they instructed,i still got the same error,now with another IP.I am determined to beat the odds and make it work bro.Anyway thanks.