0
votes

Installed: - Windows 7 64Bit - Ruby200-x64 - Rails (4.0.0) - rubygems-update (2.0.3) - mysql2(0.3.11) - mysql-installer-community-5.6.12.1

Trying to run Webrick with the command: reails s, after creating a new rails application called simple_cms: (please see the command on line below)

Any help on configuration will be appreciated. Not sure where I am going wrong.... Please help!!.

C:\Users\User\My Documents\sites\simple_cms>rails s

Usage:
rails new APP_PATH [options]

Options:
-r, [--ruby=PATH]              # Path to the Ruby binary of your choice
                             # Default: C:/Ruby200-x64/bin/ruby.exe
-m, [--template=TEMPLATE]      # Path to some application template (can be a f
ilesystem path or URL)
  [--skip-gemfile]           # Don't create a Gemfile
-B, [--skip-bundle]            # Don't run bundle install
-G, [--skip-git]               # Skip .gitignore file
  [--skip-keeps]             # Skip source control .keep files
-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 to Rails    repository
-T, [--skip-test-unit]         # Skip Test::Unit files
  [--rc=RC]                  # Path to file containing extra configuration options for rails command
  [--no-rc]                  # Skip loading of extra configuration options f

rom .railsrc file

Runtime options: -f, [--force] # Overwrite files that already exist -p, [--pretend] # Run but do not make any changes -q, [--quiet] # Suppress 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."



gem list:

C:\Users\User\My Documents\sites\simple_cms>gem list

* LOCAL GEMS *

  • actionmailer (4.0.0)
  • mactionpack (4.0.0)
  • activemodel (4.0.0)
  • activerecord (4.0.0)
  • activerecord-deprecated_finders (1.0.3)
  • activesupport (4.0.0)
  • arel (4.0.0)
  • atomic (1.1.10)
  • bigdecimal (1.2.0)
  • builder (3.1.4)
  • bundler (1.3.5)
  • coffee-rails (4.0.0)
  • coffee-script (2.2.0)
  • coffee-script-source (1.6.3)
  • erubis (2.7.0)
  • execjs (1.4.0)
  • hike (1.2.3)
  • i18n (0.6.4)
  • io-console (0.4.2)
  • jbuilder (1.4.2)
  • jquery-rails (3.0.3, 3.0.2)
  • json (1.8.0, 1.7.7)
  • mail (2.5.4)
  • mime-types (1.23)
  • minitest (4.7.5, 4.3.2)
  • multi_json (1.7.7)
  • mysql (2.9.1)
  • mysql2 (0.3.11)
  • polyglot (0.3.3)
  • psych (2.0.0)
  • rack (1.5.2)
  • rack-test (0.6.2)
  • rails (4.0.0)
  • railties (4.0.0)
  • rake (10.1.0, 0.9.6)
  • rdoc (4.0.0, 3.12.2)
  • rubygems-update (2.0.3)
  • sass (3.2.9)
  • sass-rails (4.0.0)
  • sdoc (0.3.20)
  • sprockets (2.10.0)
  • sprockets-rails (2.0.0)
  • test-unit (2.0.0.0)
  • thor (0.18.1)
  • thread_safe (0.1.0)
  • tilt (1.4.1)
  • treetop (1.4.14)
  • turbolinks (1.2.0)
  • tzinfo (0.3.37)
  • uglifier (2.1.1)

Database.yml:

# MySQL.  Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
#   gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
#   gem 'mysql2'
#
# And be sure to use new-style password hashing:
#   http://dev.mysql.com/doc/refman/5.0/en/old-client.html

development:
adapter: mysql2
encoding: utf8
database: simple_cms_development
pool: 5
username: root
password: 
host: localhost

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.

test:
adapter: mysql2
encoding: utf8
database: simple_cms_test
pool: 5
username: root
password: 
host: localhost

production:
adapter: mysql2
encoding: utf8
database: simple_cms_production
pool: 5
username: root
password:
host: localhost
1

1 Answers

0
votes

If you just want to use Webrick, the easiest way is to run Rack on the config.ru file in your project root directory, which Rails includes in new applications by default:

rackup

That should automatically start your rails app on the webrick server