Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ruby on rails server not starting [duplicate]

Hi, when I try to run rails server, it just exits and displays the message below:

C:\rails_project\first_app>rails s
=> Booting WEBrick
=> Rails 4.1.0 application starting in development on http0 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-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/data_source.rb:1
99:in `rescue in create_default_data_source': No timezone data source could be f
ound. To resolve this, either install TZInfo::Data (e.g. by running `gem install
 tzinfo-data`) or specify a zoneinfo directory using `TZInfo::DataSource.set(:zo
neinfo, zoneinfo_path)`. (TZInfo::DataSourceNotFound)

Could somebody let me know what i am missing?

like image 891
agent_bean Avatar asked Dec 20 '22 16:12

agent_bean


2 Answers

I don't know if you're still with that problem, i was struggling with the same issue, until after a couple weeks i finally solved it. that is a problem with x64 machines.

just go to your gemfile and search for gem 'tzinfo-data'

then in the array add this :x64_mingw

it must look like this

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

then save, do bundle update and then bundle install, and luckyly your rails server will start.

like image 154
DanielHolguin Avatar answered Jan 01 '23 19:01

DanielHolguin


Sounds like you need:

gem install tzinfo

I have tzinfo 1.1.0 installed on my machine.

Another package you might need is:

gem install tzinfo-data

Be sure to add it to your Gemfile:

gem 'tzinfo-data', '1.2014.5'
like image 35
beautifulcoder Avatar answered Jan 01 '23 20:01

beautifulcoder