I would not advise to do the learning phase in development mode on a VPS
if it is exposed to the Internet. Also, setting up all aspects of the VPS
(including security) yourself, while learning Rails is not trivial. Maybe you are
better helped by a hosting company with good service or running production
on PaaS providers (like Heroku, Engine Yard, etc.).
the output of db:create is :
rake aborted!
uninitialized constant Rake::DSL
/usr/lib/ruby/1.9.1/rake.rb:2482:in `const_missing’
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:8:in
`class:TaskLib’
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:6:in
`module:Rake’
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:3:in
`<top (required)>’
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/testtask.rb:4:in
`require’
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/testtask.rb:4:in
`<top (required)>’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/test_unit/testing.rake:2:in
`require’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/test_unit/testing.rake:2:in
`<top (required)>’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/test_unit/railtie.rb:12:in
`load’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/test_unit/railtie.rb:12:in
`block in class:TestUnitRailtie’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie.rb:184:in
`instance_exec’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie.rb:184:in
`block in load_tasks’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie.rb:184:in
`each’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie.rb:184:in
`load_tasks’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:423:in
`block in load_tasks’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/railties.rb:8:in
`each’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/railties.rb:8:in
`all’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:423:in
`load_tasks’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:145:in
`load_tasks’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in
`method_missing’
/home/thecssninja.net/rails_app/ninja/Rakefile:7:in `<top (required)>’
/usr/lib/ruby/1.9.1/rake.rb:2373:in `load’
/usr/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile’
/usr/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile’
/usr/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling’
/usr/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile’
/usr/lib/ruby/1.9.1/rake.rb:1991:in `run’
/usr/bin/rake:31:in `’
and the output for db:mirgrate is :
rake aborted!
uninitialized constant Rake::DSL
/usr/lib/ruby/1.9.1/rake.rb:2482:in `const_missing’
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:8:in
`class:TaskLib’
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:6:in
`module:Rake’
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:3:in
`<top (required)>’
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/testtask.rb:4:in
`require’
/usr/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/testtask.rb:4:in
`<top (required)>’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/test_unit/testing.rake:2:in
`require’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/test_unit/testing.rake:2:in
`<top (required)>’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/test_unit/railtie.rb:12:in
`load’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/test_unit/railtie.rb:12:in
`block in class:TestUnitRailtie’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie.rb:184:in
`instance_exec’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie.rb:184:in
`block in load_tasks’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie.rb:184:in
`each’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie.rb:184:in
`load_tasks’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:423:in
`block in load_tasks’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/railties.rb:8:in
`each’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application/railties.rb:8:in
`all’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:423:in
`load_tasks’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:145:in
`load_tasks’
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in
`method_missing’
/home/thecssninja.net/rails_app/ninja/Rakefile:7:in `<top (required)>’
/usr/lib/ruby/1.9.1/rake.rb:2373:in `load’
/usr/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile’
/usr/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile’
/usr/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling’
/usr/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile’
/usr/lib/ruby/1.9.1/rake.rb:1991:in `run’
/usr/bin/rake:31:in `’
Now i can see a issue but i don’t know why its happening, plus i have
tried mysql, mysql2 still don’t work
Here is the database.yml file as well.
SQLite version 3.x
gem install sqlite3
Ensure the SQLite 3 gem is defined in your Gemfile
gem ‘sqlite3’
development:
host: localhost
adapter: mysql2
encoding: utf8
database: development
username: root
password:
pool: 5
timeout: 5000
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:
host: localhost
adapter: mysql2
encoding: utf8
database: testing
usrename: root
password:
pool: 5
timeout: 5000
production:
host: localhost
adapter: mysql2
encoding: utf8
database: production
username: root
password:
pool: 5
timeout: 5000
Are these number of spaces exact? The .yml format
needs an exact number of 2 spaces (no tabs) before
the keys like ‘host’, ‘adapter’ etc. It looks like the