Ruby on Rails : is IP port 3000 locked out for external access, on Rails 4.2? -
i run 2 versions on ror application on computer: 1 demos (stable state, ror 4.0), other 1 development (ror 4.2). both versions can accessed using http://localhost:3000.
but noticed annoying difference: demo version can accessed computer on network. dev version cannot. big trouble when dev version stabilized , becomes demo. customer wants test on own laptop, through wlan.
is there "firewall" feature newly implemented ? 1 of gems ?
i glad if can explain me changed behaviour !
server webrick webrick 1.3.1 both environments. here gem files:
development (not accessible computer)
source 'https://rubygems.org' ruby '2.2.0' gem 'rails', '~> 4.2.0' gem 'bootstrap-sass', '~> 3.3.3' gem 'sass-rails', '~> 5.0.1' gem 'coffee-rails', '~> 4.1.0' gem 'uglifier', '~> 2.7' gem 'bcrypt', '~> 3.1.10' gem 'jquery-rails', '~> 4.0.3' gem 'turbolinks', '2.5.3' gem 'jbuilder', '~> 2.2.6' gem 'bootstrap-datepicker-rails', '~> 1.3.1' gem 'will_paginate', '~> 3.0.7' gem 'bootstrap-will_paginate', '~> 0.0.10' gem 'selenium-webdriver', '~> 2.44.0' gem 'sequenced', '~> 2.0.0' gem 'annotate', '~> 2.6.5' gem 'rspec-rails', '~> 3.2.0' gem 'capybara', '~> 2.4.4' gem 'factory_girl_rails', '~> 4.5.0' group :doc gem 'sdoc', '0.3.20', require: false end # gem dev , test group :development, :test gem 'pg' end # gem oracle poc group :oracle gem 'ruby-oci8', '~> 2.1.7' gem 'activerecord-oracle_enhanced-adapter', github: 'rsim/oracle-enhanced', branch: 'rails42' # gem 'activerecord-oracle_enhanced-adapter', '~> 1.5.5' end # gem production group :production gem 'rails_12factor' gem 'pg' end
demo (can accessed external computer)
source 'https://rubygems.org' ruby '2.0.0' gem 'rails', '~> 4.0.0' gem 'bootstrap-sass', '2.3.2' gem 'sass-rails', '~> 4.0.0' gem 'coffee-rails', '~> 4.0.0' gem 'uglifier', '2.1.2' gem 'bcrypt', '~> 3.1.0' gem 'jquery-rails', '~> 3.0.4' gem 'turbolinks', '1.3.0' gem 'jbuilder', '1.4.2' gem 'bootstrap-datepicker-rails' gem 'will_paginate', '3.0.4' gem 'bootstrap-will_paginate', '0.0.9' gem 'selenium-webdriver', '2.42.0' gem 'sequenced' group :doc gem 'sdoc', '0.3.20', require: false end # gem dev , test group :development, :test gem 'pg' gem 'annotate', '2.5.0' gem 'rspec-rails', '2.14.0' gem 'capybara', '2.1.0' gem 'factory_girl_rails', '4.2.0' end # gem oracle poc group :oracle gem 'ruby-oci8', '~> 2.1.0' gem 'activerecord-oracle_enhanced-adapter', '~> 1.5.0' gem 'annotate', '2.5.0' gem 'rspec-rails', '2.14.0' gem 'capybara', '2.1.0' gem 'factory_girl_rails', '4.2.0' end # gem production group :production gem 'rails_12factor' gem 'pg' end
thanks !
fred
it seem rails 4.2 doesn't allow external access localhost:3000
. why did this, cannot tell you. however, 1 solution worked me few days ago change ip address app uses development. call when starting server:
rails s -b (address) -p 3000 -e development
replacing (address) internal ip address (usually 192.168.1.x
).
Comments
Post a Comment