Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Installing a Ruby Development Environment Installing a Ruby Development Environment Installing Ruby on Windows

Amin Ben Said
Amin Ben Said
6,785 Points

rails server exits automatically

after following all the instructions from the video i came to the point "bundle exec rails server" and it shows me the following error message

C:\testapp>bundle exec rails server
DL is deprecated, please use Fiddle
=> Booting WEBrick
=> Rails 4.1.1 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0
.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
C:/Ruby200/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/data_source.rb:199:i
n `rescue in create_default_data_source': No timezone data source could be found
. To resolve this, either install TZInfo::Data (e.g. by running `gem install tzi
nfo-data`) or specify a zoneinfo directory using `TZInfo::DataSource.set(:zonein
fo, zoneinfo_path)`. (TZInfo::DataSourceNotFound)

I run gem install tzinfo-data but it still doesn't work. Do you know what's wrong?

Edvards Valbahs
Edvards Valbahs
Courses Plus Student 23,881 Points

Hello Amin Ben Said,

I would like to say that I have the same issue on win 8 x64. Did you figure it out :) ? Thank You for any help

8 Answers

Stone Preston
Stone Preston
42,016 Points

check your gemfile. see if you have a line that looks like this:

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

You most likely do. However you are probably running a 64 bit version of windows, which the following line will not pick up. You need to add a 64bit version to that platforms array:

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

after making these changes run

$ bundle update
$ bundle install

(dont include the $ in your commands, its just there to signify the terminal prompt)

and then try starting your server again

OH YES!!! IT WORKS, SOLVED THE PROBLEM, GOOD JOB MAN THEY SHOULD PUT THIS ON THE ORIGINAL TUTORIAL SO PEOPLE WHO USE 64BIT COMPUTER DONT NEED TO SEARCH FOR THIS POST!! SRY CAPS

Amin Ben Said
Amin Ben Said
6,785 Points

thats what I get after doing these changes:

C:\testapp>bundle update
`x64_mingw` is not a valid platform. The availabl
:ruby_18, :ruby_19, :ruby_20, :mri, :mri_18, :mri
:mswin, :mingw, :mingw_18, :mingw_19, :mingw_20]
Stone Preston
Stone Preston
42,016 Points

can you post your gemfile please

Amin Ben Said
Amin Ben Said
6,785 Points
source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

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

# Use debugger
# gem 'debugger', group: [:development, :test]

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
Stone Preston
Stone Preston
42,016 Points

that looks correct. try saving your gem file then running bundle update again.

Stone Preston
Stone Preston
42,016 Points

try running gem update --system to update ruby gems then try running bundle install again

Amin Ben Said
Amin Ben Said
6,785 Points

thats what I did but it isnt working...

is there a difference between installing the ruby development enviroment as it is shown in this course and the full kit from railsinstaller.org? I just downloaded the railsinstaller (ruby 2.0.0) and it is working

Stone Preston
Stone Preston
42,016 Points

how did you install before?

Stone Preston
Stone Preston
42,016 Points

if you installed the x64 version of ruby did you install the dev kit?

ruby dk.rb init
ruby dk.rb install

if you didnt do that im sure thats what caused it

Amin Ben Said
Amin Ben Said
6,785 Points

I downloaded the x64 version of devkit and installed it as shown in the course - like 5 times :-/

Amin Ben Said
Amin Ben Said
6,785 Points

hi edvards, no I still have this issue. In the meantime I just installed the 2.0 version from railsinstaller.org and that's working for me so far.