1
resposta

Erro ao criar tabela

Código inserido: C:\Users\1514501\gnomolost>rails g model produto nome descricao:text quantidade:interger preco:decimal

Feedback: C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/railtie.rb:22:in rescue in block in <class:Railtie>': tzinfo-data is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle install (TZInfo::DataSourceNotFound) from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/railtie.rb:19:inblock in ' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in instance_exec' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:inrun' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:59:in block in run_initializers' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/tsort.rb:228:inblock in tsort_each' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/tsort.rb:431:ineach_strongly_connected_component_from' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/tsort.rb:347:ineach' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/tsort.rb:347:in call' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/tsort.rb:347:ineach_strongly_connected_component' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/tsort.rb:226:in tsort_each' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/tsort.rb:205:intsort_each' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:58:in run_initializers' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:353:ininitialize!' from C:/Users/1514501/gnomolost/config/environment.rb:5:in <top (required)>' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:329:inrequire' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:329:in require_environment!' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/actions.rb:16:inrequire_application_and_environment!' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/generate/generate_command.rb:19:in perform' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:inrun' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:indispatch' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in perform' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:ininvoke' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in <top (required)>' from bin/rails:4:inrequire' from bin/rails:4:in `'

1 resposta

Oi Guilherme, tudo bem? O erro tá dizendo que o Rails requer uma GEM que você não tem instalada atualmente:

tzinfo-data is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle install

O erro diz pra por gem 'tzinfo-data' no seu Gemfile e depois executar o comando bundle install no diretório onde está o Gemfile.

Vê isso e tenta novamente por favor?