I want to use Smashing (a sinitra-based dashboard-making tool) on a Windows machine. When lanching the the default project using smashing start I get the following error :
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/et-orbi-1.1.2/lib/et-orbi.rb:309:in `initialize': Cannot determine timezone from nil (ArgumentError)
(secs:1531385616.656456,utc~:"2018-07-12 08:53:36.6564559936523438",ltz~:nil)
(etz:nil,tnz:"Paris, Madrid (heure d\x92\xE9t\xE9)",tzid:"constant",rv:"2.3.3",rp:"i386-mingw32",win:true,rorv:nil,astz:nil,eov:"1.1.2",eotnz:"???",eotnfz:"???",eotlzn:"???",
debian:nil,centos:nil,osx:nil)
Try setting `ENV['TZ'] = 'Continent/City'` in your script (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/et-orbi-1.1.2/lib/et-orbi.rb:21:in `new'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/et-orbi-1.1.2/lib/et-orbi.rb:21:in `now'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/et-orbi-1.1.2/lib/et-orbi.rb:259:in `now'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler.rb:543:in `start'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler.rb:89:in `initialize'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/smashing-1.1.0/lib/dashing/app.rb:11:in `new'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/smashing-1.1.0/lib/dashing/app.rb:11:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/smashing-1.1.0/lib/dashing.rb:3:in `require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/smashing-1.1.0/lib/dashing.rb:3:in `<top (required)>'
from config.ru:1:in `require'
from config.ru:1:in `block in <main>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `instance_eval'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/rack/adapter/loader.rb:33:in `eval'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/rack/adapter/loader.rb:33:in `load'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/thin/controllers/controller.rb:72:in `start'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/thin/runner.rb:203:in `run_command'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/thin/runner.rb:159:in `run!'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/bin/thin:6:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.3/bin/thin:22:in `load'
from C:/RailsInstaller/Ruby2.3.3/bin/thin:22:in `<main>'
After looking online, I found out that this issue is probably due to Windows, and I tried adding gem 'tzinfo-data' in my Gemfile, but that didn't change anything. Do you know how I could fix that ?
ENV['TZ'] = 'Europe/Paris' at the very beginning of config.ru (before the require) worked
Related
When I installed redmine-3.3 & 3.4 , I am not getting redmine page
I am facing this Error
Web application could not be started
undefined method `require_sudo_mode' for EmailAddressesController:Class (NoMethodError)
/usr/share/redmine/app/controllers/email_addresses_controller.rb:21:in `<class:EmailAddressesController>'
/usr/share/redmine/app/controllers/email_addresses_controller.rb:18:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:251:in `require'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:251:in `block in require'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:236:in `load_dependency'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:251:in `require'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:359:in `require_or_load'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:313:in `depend_on'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:225:in `require_dependency'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:444:in `block (2 levels) in eager_load!'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:443:in `each'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:443:in `block in eager_load!'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:441:in `each'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:441:in `eager_load!'
/usr/lib/ruby/vendor_ruby/rails/application/finisher.rb:53:in `block in <module:Finisher>'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `instance_exec'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `run'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:55:in `block in run_initializers'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in `each'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in `run_initializers'
/usr/lib/ruby/vendor_ruby/rails/application.rb:136:in `initialize!'
/usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:in `method_missing'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/usr/lib/ruby/vendor_ruby/rack/builder.rb:51:in `instance_eval'
/usr/lib/ruby/vendor_ruby/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:112:in `eval'
/usr/share/passenger/helper-scripts/rack-preloader.rb:112:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
Application root /usr/share/redmine Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV) production Ruby interpreter
command /usr/bin/ruby.. .... ..
Can you give me suggestions?
Please ensure you'r connected with your database and did you missing any required gem.
require_sudo_mode. If the error comes because of this you definitely missing this gem.
This type of error comes under database not connected issue.If you are fix that this would be start.Thanks..!
I have been following directions in this book (and I made sure I copied everything over correctly). The example I'm working on is making a simple application by first generating a controller, creating an action, and then creating a template. This is just a simple "hello world" example.
The problem: When I enter "rails server" (while in the app folder) in my Terminal, I get a bunch of stuff, but it starts off with an undefined method error. I am posting the stuff below:
admins-MacBook-Pro:hello alexcrisan$ rails server
=> Booting Puma
=> Rails 5.0.0.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Exiting
/Users/alexcrisan/Documents/Beginning Rails 4/hello/config/routes.rb:2:in `block in <top (required)>': undefined method ` get' for #<ActionDispatch::Routing::Mapper:0x007fe383be0a00> (NoMethodError)
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:389:in `instance_exec'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:389:in `eval_block'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:371:in `draw'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config/routes.rb:1:in `<top (required)>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `block in load'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/activesupport-5.0.0.1/lib/active_support/file_update_checker.rb:77:in `execute'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:119:in `block in <module:Finisher>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config/environment.rb:5:in `<top (required)>'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config.ru:3:in `require_relative'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config.ru:3:in `block in <main>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/builder.rb:55:in `instance_eval'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/builder.rb:55:in `initialize'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config.ru:in `new'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config.ru:in `<main>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/builder.rb:49:in `eval'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/builder.rb:49:in `new_from_string'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/builder.rb:40:in `parse_file'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/server.rb:318:in `build_app_and_options_from_config'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/server.rb:218:in `app'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/server.rb:59:in `app'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/server.rb:353:in `wrapped_app'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/server.rb:124:in `log_to_stdout'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/server.rb:77:in `start'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:90:in `block in server'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/bin/rails:9:in `require'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/bin/rails:9:in `<top (required)>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `load'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `call'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/client/command.rb:7:in `call'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/client.rb:30:in `run'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/bin/spring:49:in `<top (required)>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `load'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `<top (required)>'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/bin/spring:14:in `require'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/bin/spring:14:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I'm not sure why it's doing this, so any help is appreciated!
Thanks
The error says undefined method ` get' for .
This is due to the extra spaces before 'get'. Remove them and I think you should be good to go.
I got this error when i ran the 'rackup' command after using rake for database migrations, i don't understand what this means.
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:3:in `<top (required)>': undefined method `namespace' for main:Object (NoMethodError)
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `block in load'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sinatra-activerecord-2.0.6/lib/sinatra/activerecord/rake.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/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.3/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
from C:/wamp/www/sinatra-template-master/config.ru:2:in `block in <main>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from C:/wamp/www/sinatra-template-master/config.ru:in `new'
from C:/wamp/www/sinatra-template-master/config.ru:in `<main>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:147:in `start'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/bin/rackup:4:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/bin/rackup:23:in `load'
from C:/RailsInstaller/Ruby2.1.0/bin/rackup:23:in `<main>'
pls help, thanks!
i have this in my config.ru file
require './app'
require 'sinatra/activerecord/rake'
run Sinatra::Application
I tried to do the same config.ru. When i removed
require 'sinatra/activerecord/rake'
Everything started to work.
Method "namespace" is defined in rake/dsl_definition.rb. So, your application extending Sinatra::Base doesn't see it.
I'm just getting my feet wet in rails development. Trying to learn from "Head First Rails", which is fairly out of date. But I'm updating the commands to more modern versions of rails.
Anyway, I'm trying to use the rails generate scaffold command and running into the following error:
[root#web1:/var/www/tickets] #rails generate scaffold name:string seat_id_seq:string address:text price_paid:decimal email_address:string
invoke active_record
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/base.rb:258:in `const_defined?': wrong constant name Name:string (NameError)
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/base.rb:258:in `block in class_collisions'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/base.rb:249:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/base.rb:249:in `class_collisions'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/named_base.rb:200:in `block in check_class_collision'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:277:in `block in _invoke_for_class_method'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/shell.rb:68:in `with_padding'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:266:in `_invoke_for_class_method'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:149:in `_invoke_from_option_orm'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators.rb:157:in `invoke'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands/generate.rb:11:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:135:in `generate_or_destroy'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:51:in `generate'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands.rb:17:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
from /var/www/tickets/bin/rails:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `block in load'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `load'
from /usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
I'm running ruby 1.9.3 via rvm and rails 4 via gem. The server is CentOS 7
I was just wondering if any of you might have run into a similar situation and know how I can get past this error.
Thanks!
Usage:
rails generate scaffold NAME [field[:type][:index] field[:type][:index]] [options]
Examples:
`rails generate scaffold post`
`rails generate scaffold post title body:text published:boolean`
You're not specifying name attribute, (i.e model)
I'm getting a strange error when running cap deploy:setup:
cap deploy:setup
Using ActiveModel validations.
Validations included SimpleRecord::Base
New Aws::SdbInterface using per_thread-connection mode
New Aws::S3Interface using per_thread-connection mode
/Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/command.rb:24:in `initialize': undefined method `strip' for Sinatra::Application:Class (NoMethodError)
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/command.rb:109:in `new'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/command.rb:109:in `else'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/actions/invocation.rb:144:in `block in run'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/command.rb:101:in `initialize'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/actions/invocation.rb:144:in `new'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/actions/invocation.rb:144:in `run'
from Capfile:9:in `load'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:93:in `instance_eval'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:93:in `load'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:89:in `load'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:86:in `block in load'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:86:in `each'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:86:in `load'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/cli/execute.rb:65:in `block in load_recipes'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/cli/execute.rb:65:in `each'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/cli/execute.rb:65:in `load_recipes'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/cli/execute.rb:31:in `execute!'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/lib/capistrano/cli/execute.rb:14:in `execute'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/gems/capistrano-2.5.21/bin/cap:4:in `<top (required)>'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/bin/cap:19:in `load'
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136#sinatra/bin/cap:19:in `<main>'
Any ideas on how to troubleshoot this?
It turns out the MyApp.rb did not actually define class MyApp. I added this:
class MyApp < Sinatra::Base
that error is now cleared.