|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Install problem with mysql
Hello. I am new to this stuff and i have some problem. I have winxp, apache2triad and i downloaded the ruby installer for windows. I followed the tutorial in http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1
without re-installing mysql as i already have it. I created an empty rails application, i did the "ruby script\server" and i show the intro page. I also managed to create a controller. The problem is with the mysql. First of all i didn't see any test database. Moreover i created a database and i then go to the database.yml to see it. I saw "# MySQL (default setup). Versions 4.1 and 5.0 are recommended." . I expected to see something like development: adapter: database: etc If i place the code by myself and try to restart the webserver i get a message: C:\rails\cookbook>ruby script\server => Booting WEBrick... c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_ adapters/abstract/connection_specification.rb:194:in `establish_connection': dev elopment database is not configured (ActiveRecord::AdapterNotSpecified) from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_recor d/connection_adapters/abstract/connection_specification.rb:185:in `establish_con nection' from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:182:i n `initialize_database' from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:84:in `process' from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in `send' from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in `run' from ./script/../config/../config/environment.rb:13 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `ge m_original_require' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re quire' ... 6 levels... from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `ge m_original_require' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re quire' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_suppo rt/dependencies.rb:147:in `require' from script/server:3 Any idea? |
|
#2
|
||||
|
||||
|
Please post the database.yml you used. Normally it should look like:
Code:
development: adapter: mysql database: example_dev username: ruby password: secret123 host: localhost test: adapter: mysql database: example_test username: ruby password: secret123 host: localhost production: development Also, you need to check if you have installed the ruby-databasedriver for mysql. The default database.yml contains a hint: Code:
# Install the MySQL driver: # gem install mysql # On MacOS X: # gem install mysql -- --include=/usr/local/lib # On Windows: # There is no gem for Windows. Install mysql.so from RubyForApache. # http://rubyforge.org/projects/rubyforapache bye, grande |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Ruby Programming > Install problem with mysql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|