Rails App - Server is not working to show preview



This is my first time using Cloud 9. I cloned a specific project in github followed then by these steps.

  1. Bundle Install
  2. rake db:migrate
  3. rails s

After doing that I went to tcp://localhost:8080 but got hit with this error “tcp’s server DNS address could not be found”

I have provided my gem file below and my database.yml. Thank you so much guys :smile:

default: &default
  adapter: sqlite3
  pool: 5
  timeout: 5000

  <<: *default
  database: db/development.sqlite3

  <<: *default
  database: db/test.sqlite3

  <<: *default
  database: db/production.sqlite3


gem 'rails', '~> 5.0.0', '>='
gem 'sqlite3'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'jquery-rails'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.7'
gem 'devise', '~> 4.2'
gem 'omniauth-facebook', '~> 4.0'
gem 'paperclip', '~> 5.1'
gem 'redis'
gem "font-awesome-rails"
gem 'chosen-rails'
gem 'devise-bootstrap-views', '~> 0.0.9'
gem 'pry', '~> 0.10.4'
gem 'bootstrap-modal-rails', '~> 2.2', '>= 2.2.5'
gem 'better_errors', '~> 2.1', '>= 2.1.1'

group :development, :test do
  # 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: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]


Please try going to your Cloud9 specific URL (localhost refers to the computer you’re on, not Cloud9). The URL is in the format workspacename-username.c9users.io.


@dannytech Actually figured out the issue partially it was what you said :smile: if anyone faces this you should do the following

  1. $ rails server -b $IP -p $PORT
  2. Run Project (opens command line Terminal) and click run

You should be good :slight_smile:


@dannytech Hi, I know this is an old post but I’m having the same problem. How do I do what you suggest? Go to my Cloud9 specific URL? I’m starting Michael Hartl’s tutorial and can’t seem to get the page up. Thanks so much in advance!


Yes, follow @OmarZV’s instructions first and then go to your workspace URL. In your case, that’s probably <workspace name>-emedosy.c9users.io:<port number>


Yes. Followed, @OmarZV’s instructions and the opened the URL that “Run” through out and there it was. However when I run $rails server… it’s the same URL:

  • Listening on tcp://

that gives the “tcp’s server IP address could not be found”. Is there something to do so that I can see the right URL when I run rails s? Thanks to both for your answers :slight_smile: