# Rails 1.1 and webrick/mysql problems

**URL:** <https://www.ruby-forum.com/t/rails-1-1-and-webrick-mysql-problems/56938>\
**Category:** Rails\
**Created:** [April 5, 2006, 11:27pm UTC](https://www.ruby-forum.com/t/rails-1-1-and-webrick-mysql-problems/56938 "2006-04-05T23:27:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anabia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/35a633/32.png) [@anabia](https://www.ruby-forum.com/u/anabia)\
**Post date:** [April 5, 2006, 11:27pm UTC](https://www.ruby-forum.com/t/rails-1-1-and-webrick-mysql-problems/56938/1 "2006-04-05T23:27:50Z")

</div>

i just upgraded to rails 1.1 yesterday and since then i couldÂ´nt make it  
work with mysql, for example i have my database “todo” and one table  
“todos”, i create the app and generate the model but when i try to  
generate the scaffold with “ruby script/generate scaffold Todo Todo” i  
get this error " error Before updating scaffolding from new DB schema,  
try creating a table for your model (Todo)", i have the values in the  
database.yml correct, and also when i try to boot webrick i get this:

=\> Booting WEBrick…  
C:/ruby/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 27, col 2:` socket: /path/to/your/mysql.sock’ (ArgumentError)  
from C:/ruby/lib/ruby/1.8/yaml.rb:133:in `load' from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:459:in`database\_configuration’  
from  
C:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:181:in  
`initialize_database' from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:84:in`process’  
from  
C:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:42:in  
`run' from ./script/../config/../config/environment.rb:10 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require’  
from  
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active\_support/dependencies.rb:136:in  
`require' from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/commands/servers/webrick.rb:52 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require’  
from  
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active\_support/dependencies.rb:136:in  
`require' from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/commands/server.rb:30 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require’  
from  
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active\_support/dependencies.rb:136:in  
`require’  
from ./script/server:3  
from -e:3

and never starts, by the way, im on windows, hope someone can help with  
this cause im going crazy with all this ☹

---

<div class="post-metadata">

**Author:** ![anabia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/35a633/32.png) [@anabia](https://www.ruby-forum.com/u/anabia)\
**Post date:** [April 6, 2006, 12:35am UTC](https://www.ruby-forum.com/t/rails-1-1-and-webrick-mysql-problems/56938/2 "2006-04-06T00:35:28Z")

</div>

On Wed, 2006-04-05 at 23:27 +0200, Ana B. wrote:

> 2: `socket: /path/to/your/mysql.sock' (ArgumentError) from from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require’  
> from ./script/server:3  
> from -e:3
> 
> and never starts, by the way, im on windows, hope someone can help with  
> this cause im going crazy with all this ☹

* * *

did you do ‘rake rails:update’ after you updated? Have you always used  
sockets to connect to mysql?

Craig

---

<div class="post-metadata">

**Author:** ![anabia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/35a633/32.png) [@anabia](https://www.ruby-forum.com/u/anabia)\
**Post date:** [April 6, 2006, 12:47am UTC](https://www.ruby-forum.com/t/rails-1-1-and-webrick-mysql-problems/56938/3 "2006-04-06T00:47:25Z")

</div>

Craig W. wrote:

> On Wed, 2006-04-05 at 23:27 +0200, Ana B. wrote:
> 
> > 2: ` socket: /path/to/your/mysql.sock' (ArgumentError) from from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require’  
> > from ./script/server:3  
> > from -e:3
> > 
> > and never starts, by the way, im on windows, hope someone can help with  
> > this cause im going crazy with all this ☹
> 
> * * *
> 
> did you do ‘rake rails:update’ after you updated? Have you always used  
> sockets to connect to mysql?
> 
> Craig

Yes i already done “rake rails:update” and still get the same errors my  
database.ymal fiel have an info like this:

development:  
adapter: mysql  
database: todo\_development  
username: rasta  
password: rasta  
host: localhost

I had rails 1.0 yesterday and all was fine, just upgraded to 1.1 and all  
screwed up, im using ruby1.8.4/rails1.1/mysql4.x/windows, i tried  
reinstalling all and restarting but nothing, hope you can help me, im  
already have one day hours dedicated to find a solution to this problem  
but i cant find it, in google, irc, [wiki.rubyonrails.com](http://wiki.rubyonrails.com), and some  
places more.

Convention over configuration… im starting to have doubts about that  
☹

---

<div class="post-metadata">

**Author:** ![anabia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/35a633/32.png) [@anabia](https://www.ruby-forum.com/u/anabia)\
**Post date:** [April 24, 2006, 4:12am UTC](https://www.ruby-forum.com/t/rails-1-1-and-webrick-mysql-problems/56938/4 "2006-04-24T04:12:44Z")

</div>

Check your database.yml file. Make sure you go through a delete all the  
whitespaces (tab characters) and replace it with two spaces only.

I had this problem because I was testing with a blank password on one of  
my databases. Having a space for a blank password was giving the parser  
problems.
