Guys, I m trying to get up to speed on Rails via the Apple tutorial at:http://developer.apple.com/tools/rubyonrails.html Problem is when I try and access localhost:3000/expenses I get the following error. It may be a breeze for you to figure out but since I dont know jack about rails it seems cryptic to me. Application.rb seems to be very similar to the database.yml file. I''m running everything on Mac (mysql) Cheers ./script/../config/../app/controllers/application.rb:5: syntax error, unexpected '':'', expecting kEND ./script/../config/../app/controllers/application.rb:7: syntax error, unexpected '':'', expecting kEND database: expenses_development ^ ./script/../config/../app/controllers/application.rb:8: syntax error, unexpected '':'', expecting kEND username: root ^ ./script/../config/../app/controllers/application.rb:9: syntax error, unexpected '':'', expecting kEND ./script/../config/../app/controllers/application.rb:10: unknown regexp options - yql ./script/../config/../app/controllers/application.rb:15: syntax error, unexpected '':'', expecting kEND ./script/../config/../app/controllers/application.rb:17: syntax error, unexpected '':'', expecting kEND database: expenses_development ^ ./script/../config/../app/controllers/application.rb:18: syntax error, unexpected '':'', expecting kEND username: root ^ ./script/../config/../app/controllers/application.rb:19: syntax error, unexpected '':'', expecting kEND ./script/../config/../app/controllers/application.rb:20: unknown regexp options - yql ./script/../config/../app/controllers/application.rb:22: syntax error, unexpected '':'', expecting kEND ./script/../config/../app/controllers/application.rb:24: syntax error, unexpected '':'', expecting kEND database: expenses_production ^ ./script/../config/../app/controllers/application.rb:25: syntax error, unexpected '':'', expecting kEND username: root ^ ./script/../config/../app/controllers/application.rb:26: syntax error, unexpected '':'', expecting kEND password: ^ ./script/../config/../app/controllers/application.rb:27: unknown regexp options - yql ./script/../config/../app/controllers/application.rb:28: syntax error, unexpected ''<'', expecting kEND < ActionController::Base ^ /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in `load_file'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:202:in `load_file'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:94:in `require_or_load'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:60:in `depend_on'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:442:in `require_dependency'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:110:in `prepare_application'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:39:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' script/server:3 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
in a new rails app, application.rb begins life as an empty class, something like: class ApplicationController < ActionController::Base # Pick a unique cookie name to distinguish our session data from others'' session :session_key => ''_myapp_session_id'' end so unless this expenses app of yours has put code in application.rb, yours should be about the same. judging by the errors below it sounds like you have yml syntax in in a ruby file. the yml should be in a .yml file... database.yml typically looks like development: database: myapp_development username: root password: test: database: myapp_test username: root password: if you''re new to ruby and rails, then the yml syntax of "key: value" can be confusing next to ruby/rails "some_method :symbol"... subtle difference in the position of the colon. hang in there and you''ll get it. On Jun 20, 9:11 pm, Fahd <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Guys, I m trying to get up to speed on Rails via the Apple tutorial > at:http://developer.apple.com/tools/rubyonrails.html > > Problem is when I try and access localhost:3000/expenses I get the > following error. It may be a breeze for you to figure out but since I > dont know jack about rails it seems cryptic to me. Application.rb seems > to be very similar to the database.yml file. > > I''m running everything on Mac (mysql) > > Cheers > > ./script/../config/../app/controllers/application.rb:5: syntax error, > unexpected '':'', expecting kEND > ./script/../config/../app/controllers/application.rb:7: syntax error, > unexpected '':'', expecting kEND > database: expenses_development > ^ > ./script/../config/../app/controllers/application.rb:8: syntax error, > unexpected '':'', expecting kEND > username: root > ^ > ./script/../config/../app/controllers/application.rb:9: syntax error, > unexpected '':'', expecting kEND > ./script/../config/../app/controllers/application.rb:10: unknown regexp > options - yql > ./script/../config/../app/controllers/application.rb:15: syntax error, > unexpected '':'', expecting kEND > ./script/../config/../app/controllers/application.rb:17: syntax error, > unexpected '':'', expecting kEND > database: expenses_development > ^ > ./script/../config/../app/controllers/application.rb:18: syntax error, > unexpected '':'', expecting kEND > username: root > ^ > ./script/../config/../app/controllers/application.rb:19: syntax error, > unexpected '':'', expecting kEND > ./script/../config/../app/controllers/application.rb:20: unknown regexp > options - yql > ./script/../config/../app/controllers/application.rb:22: syntax error, > unexpected '':'', expecting kEND > ./script/../config/../app/controllers/application.rb:24: syntax error, > unexpected '':'', expecting kEND > database: expenses_production > ^ > ./script/../config/../app/controllers/application.rb:25: syntax error, > unexpected '':'', expecting kEND > username: root > ^ > ./script/../config/../app/controllers/application.rb:26: syntax error, > unexpected '':'', expecting kEND > password: > ^ > ./script/../config/../app/controllers/application.rb:27: unknown regexp > options - yql > ./script/../config/../app/controllers/application.rb:28: syntax error, > unexpected ''<'', expecting kEND > < ActionController::Base > ^ > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in > `load_without_new_constant_marking'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in > `load_file'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in > `new_constants_in'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:202:in > `load_file'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:94:in > `require_or_load'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:60:in > `depend_on'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:442:in > `require_dependency'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:110:in > `prepare_application'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:39:in > `dispatch'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in > `process'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in > `synchronize'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in > `process'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in > `process_client'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in > `each'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in > `process_client'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in > `initialize'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in > `new'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in > `initialize'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in > `new'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in > `each'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in > `load'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in > `load'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in > `new_constants_in'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in > `load'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in > `require'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in > `new_constants_in'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in > `require'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require'' > script/server:3 > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dude, you rock for volunteering to respond. And I havent even read your response yet! I''ll look into making the changes you outlined and get back to you brah. thanks Fahd Jeff Emminger wrote:> in a new rails app, application.rb begins life as an empty class, > something like: > class ApplicationController < ActionController::Base > # Pick a unique cookie name to distinguish our session data from > others'' > session :session_key => ''_myapp_session_id'' > end > > so unless this expenses app of yours has put code in application.rb, > yours should be about the same. > > judging by the errors below it sounds like you have yml syntax in in a > ruby file. the yml should be in a .yml file... database.yml typically > looks like > > development: > database: myapp_development > username: root > password: > > test: > database: myapp_test > username: root > password: > > > if you''re new to ruby and rails, then the yml syntax of "key: value" > can be confusing next to ruby/rails "some_method :symbol"... subtle > difference in the position of the colon. hang in there and you''ll get > it.-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---