Ruby Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesRuby Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old November 9th, 2006, 04:58 PM
vasilanthropos vasilanthropos is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 145 vasilanthropos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 2 h 47 m 24 sec
Reputation Power: 3
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?

Reply With Quote
  #2  
Old November 17th, 2006, 02:39 AM
grande's Avatar
grande grande is offline
$foo->bar($_);
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Location: London
Posts: 86 grande User rank is Sergeant Major (2000 - 5000 Reputation Level)grande User rank is Sergeant Major (2000 - 5000 Reputation Level)grande User rank is Sergeant Major (2000 - 5000 Reputation Level)grande User rank is Sergeant Major (2000 - 5000 Reputation Level)grande User rank is Sergeant Major (2000 - 5000 Reputation Level)grande User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 19 h 21 m 10 sec
Reputation Power: 47
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesRuby Programming > Install problem with mysql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway