I run 2 versions on my RoR application on my computer: One is for demos (stable state, RoR 4.0), the other one is for development (RoR 4.2). Both versions can be accessed using http://localhost:3000.
But I noticed an annoying difference: The Demo version can be accessed from another computer on the network. The Dev version cannot. This will be a big trouble when the Dev version is stabilized and becomes the Demo. My customer wants to test on his own laptop, through the wlan.
Is there a "firewall" feature newly implemented ? Is it one of my Gems ?
I would be glad if someone can explain to me this changed behaviour !
Server is Webrick WEBrick 1.3.1 for both environments. Here are my gem files:
Development (not accessible from another 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 do
gem 'sdoc', '0.3.20', require: false
end
# gem for dev and test only
group :development, :test do
gem 'pg'
end
# gem for ORACLE POC
group :ORACLE do
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 for production
group :production do
gem 'rails_12factor'
gem 'pg'
end
Demo (can be accessed from 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 do
gem 'sdoc', '0.3.20', require: false
end
# gem for dev and test only
group :development, :test do
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 for ORACLE POC
group :ORACLE do
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 for production
group :production do
gem 'rails_12factor'
gem 'pg'
end
Thanks for your help !
Fred
localhost
binds only to the127.0.0.1
interface and binding to0.0.0.0
will bind to all interfaces including the external one. So binding tolocalhost
will make it only accessable local. This is e.g. usefull if you want to make sure that a service is really only available locally. – Hallerson