Topic: Help Just starting! can't run server

I yesterday tried to install R o R but was unsuccessful in getting everything working, as shown in the instuctions on the Ruby on rails website, so reinstalled it again today.  Now I can't get Rails server to run!
I have checked the Path in windows environment and it is pointing at Ruby 1.9.3\bin, where I understand that the bat file to run rails is situated.
I get the following errors:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Tony>rails s
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]              # Path to the Ruby binary of your choice
                                 # Default: C:/RailsInstaller/Ruby1.9.3/bin/ruby
.exe
  -b, [--builder=BUILDER]        # Path to a application builder (can be a files
ystem path or URL)
  -m, [--template=TEMPLATE]      # Path to an application template (can be a fil
esystem path or URL)
      [--skip-gemfile]           # Don't create a Gemfile
      [--skip-bundle]            # Don't run bundle install
  -G, [--skip-git]               # Skip Git ignores and keeps
  -O, [--skip-active-record]     # Skip Active Record files
  -S, [--skip-sprockets]         # Skip Sprockets files
  -d, [--database=DATABASE]      # Preconfigure for selected database (options:
mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3
/jdbcpostgresql/jdbc)
                                 # Default: sqlite3
  -j, [--javascript=JAVASCRIPT]  # Preconfigure for selected JavaScript library
                                 # Default: jquery
  -J, [--skip-javascript]        # Skip JavaScript files
      [--dev]                    # Setup the application with Gemfile pointing t
o your Rails checkout
      [--edge]                   # Setup the application with Gemfile pointing t
o Rails repository
  -T, [--skip-test-unit]         # Skip Test::Unit files
      [--old-style-hash]         # Force using old style hash (:foo => 'bar') on
Ruby >= 1.9

Runtime options:
  -f, [--force]    # Overwrite files that already exist
  -p, [--pretend]  # Run but do not make any changes
  -q, [--quiet]    # Supress status output
  -s, [--skip]     # Skip files that already exist

Rails options:
  -h, [--help]     # Show this help message and quit
  -v, [--version]  # Show Rails version number and quit

Description:
    The 'rails new' command creates a new Rails application with a default
    directory structure and configuration at the path you specify.

    You can specify extra command-line arguments to be used every time
    'rails new' runs in the .railsrc configuration file in your home directory.

    Note that the arguments specified in the .railsrc file don't affect the
    defaults values shown above in this help message.

Example:
    rails new ~/Code/Ruby/weblog

    This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
    See the README in the newly created application to get going.

C:\Users\Tony>cd\sites\rails_projects\first_app

C:\Sites\rails_projects\first_app>rails server
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/
dsl.rb:7:in `instance_eval': C:/Sites/rails_projects/first_app/Gemfile:9: syntax
error, unexpected keyword_end, expecting $end (SyntaxError)
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/dsl.rb:7:in `evaluate'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/definition.rb:17:in `build'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler.rb:138:in `definition'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler.rb:126:in `load'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler.rb:110:in `setup'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/setup.rb:7:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:59:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:59:in `rescue in require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:35:in `require'
        from C:/Sites/rails_projects/first_app/config/boot.rb:6:in `<top (requir
ed)>'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
        from script/rails:5:in `<main>'

C:\Sites\rails_projects\first_app>

Can anyone help me solve this problem

Re: Help Just starting! can't run server

the bison parser error simply means you have some syntax error in first_app/Gemfile ! you also need to install missing dependencies - libraries/gems.

Last edited by rkjha (2012-12-26 21:11:07)

Re: Help Just starting! can't run server

I'm guessing its a missing end statement in his gemfile. That has happened to me a few times. Post your gemfile and maybe we can spot the issue. I'm guessing once that is fixed he will want to run the bundler again and then start the server. My guess is the missing end statement kept the dependancies from loading when starting the server.

Re: Help Just starting! can't run server

C:/Sites/rails_projects/first_app/Gemfile:9: syntax error, unexpected keyword_end, expecting $end (SyntaxError)

Check on or around line 9 in your gemfile.