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

ruby on rails controller creation problem

So my problem is that I'm trying to create a controller in a ruby on rails environment (for more information I was following this https://www.youtube.com/watch?v=zf6kbno4bZg video and the series associated with it). I'm not that experienced with rails or ruby (started yesterday), but I know this is the command prompt just puking some feedback in my face.

C:\Sites\ProjectMeal>rails generate controller Catalogues

DL is deprecated, please use Fiddle C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tzinfo- 1.2.2/lib/tzinfo/data_source.rb:182:in rescue in create_default_data_source': No source of timezone data could be found. (TZInfo::DataSourceNotFound) Please refer to http://tzinfo.github.io/datasourcenotfound for help resolving this error. from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/data_source.rb:179:increate_default_data_source' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/data_source.rb:40:in block in get' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/data_source.rb:39:insynchronize' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/data_source.rb:39:in get' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/timezone.rb:629:indata_source' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/timezone.rb:92:in get' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/timezone_proxy.rb:67:inreal_timezone' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/timezone_proxy.rb:30:in period_for_utc' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/timezone.rb:549:incurrent_period' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/values/time_zone.rb:282:in utc_offset' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/values/time_zone.rb:243:inblock in []' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/values/time_zone.rb:243:in tap' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/values/time_zone.rb:243:in[]' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/core_ext/time/zones.rb:61:in find_zone!' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/railtie.rb:20:inblock in <class:Railtie>' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:in instance_exec' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:inrun' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/initializable.rb:55:in block in run_initializers' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:226:inblock in tsort_each' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:348:in block (2 levels) in each_strongly_connected_component' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:427:ineach_strongly_connected_component_from' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:347:in block in each_strongly_connected_component' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:345:ineach' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:345:in call' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:345:ineach_strongly_connected_component' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:224:in tsort_each' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:205:intsort_each' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/initializable.rb:54:in run_initializers' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/application.rb:352:ininitialize!' from C:/Sites/ProjectMeal/config/environment.rb:5:in <top (required)>' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:inrequire' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in block in require' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:inload_dependency' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in require' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/application.rb:328:inrequire_environment!' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:142:in require_application_and_environment!' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:128:ingenerate_or_destroy' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:50:in generate' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:inrun_command!' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in <top (required)>' from bin/rails:4:inrequire' from bin/rails:4:in `<main>'

C:\Sites\ProjectMeal>

You can ask me to try to make it look nicer or something, but it might be something easy that I'm missing or than it's something that nobody can understand.

1 Answer

Matthew Carroll
Matthew Carroll
10,448 Points

Hey,

So it looks like your problem should be solved by reading through the information the error refers you to: https://github.com/tzinfo/tzinfo/wiki/Resolving-TZInfo::DataSourceNotFound-Errors

You'll need to check the gemfile in your rails project to ensure the tzinfo-data gem is included.