Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
rails mysql db:migrate etc
Phlip
9/12/2006 8:10:00 PM
Rubies:
Examine this command line:
ruby /usr/local/bin/rake db:migrate --trace
First, a digression about the silly command line, before the actual
question:
I switched from Ubuntu to Mandriva because the former's Ruby was so broken.
Mandriva's is hardly better. When I install all the Ruby RPMs, they put Ruby
in /usr/local/bin/ruby . Then all the Ruby products, like Gems, screw up and
look for libraries in /usr/lib/ruby.
So when I completely uninstall Ruby, and completely build and install it
from source, it gets this --prefix issue backwards. Gems insists on
installing things to /usr/local.
I'm sure there's some command line fix, and I will acknowledge any help, but
the system is currently stable enough to ask the next question.
I have installed MySQL, from RPMs, and my config/database.yml looks a little
like this:
development:
adapter: mysql
database: tracks
host: 127.0.0.1
username: tracks
password: password
When I run rake db:migrate, I get this spewage:
(in /home/phlip/projects/tracks_1.042)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
Connection refused - connect(2)
/usr/lib/ruby/1.8/mysql.rb:103:in `initialize'
/usr/lib/ruby/1.8/mysql.rb:103:in `new'
/usr/lib/ruby/1.8/mysql.rb:103:in `real_connect'
So what am I missing?
Yes, the database exists, mysqld is running as a dæmon, and I have a user
called 'tracks'@'127.0.0.1' granted permission to do stuff:
$ mysql -u tracks -p
Enter password:
mysql> use tracks;
Database changed
If you want to tell me to add socket: /tmp/mysql.sock, the file doesn't
exist, and socket: /var/lib/mysql/mysql.lock doesn't either! Oh, and I got
it all working in WinXP fine...
The mysql.rb is the Ruby-only one. I will build the .so version and try it.
But WinXP only worked with the Ruby-only mysql.rb file!
For my next magical trick, I shall figure out why CygWin's SSH keeps
aborting on <Ctrl+C>, and why CygWin-X keeps blanking the mouse cursor and
leaving it off!
--
Phlip
http://www.greencheese.u...
<-- NOT a blog!!!
2 Answers
Paul Lutus
9/13/2006 1:21:00 AM
0
Phlip wrote:
> Rubies:
>
> Examine this command line:
>
> ruby /usr/local/bin/rake db:migrate --trace
>
> First, a digression about the silly command line, before the actual
> question:
>
> I switched from Ubuntu to Mandriva because the former's Ruby was so
> broken. Mandriva's is hardly better. When I install all the Ruby RPMs,
> they put Ruby in /usr/local/bin/ruby . Then all the Ruby products, like
> Gems, screw up and look for libraries in /usr/lib/ruby.
So make a symlink from the real library directory to the expected one.
--
Paul Lutus
http://www.ara...
Phlip
9/13/2006 5:37:00 AM
0
Paul Lutus wrote:
>> I switched from Ubuntu to Mandriva because the former's Ruby was so
>> broken. Mandriva's is hardly better. When I install all the Ruby RPMs,
>> they put Ruby in /usr/local/bin/ruby . Then all the Ruby products, like
>> Gems, screw up and look for libraries in /usr/lib/ruby.
>
> So make a symlink from the real library directory to the expected one.
Thank you for reminding me how I fixed it back when Mandriva was Mandrake!
(I should'a remembered to post it; sorry.)
Now is there a non-workaround here? Or is Mandriva just less broken?
(BTW I fixed the MySQL problem by jamming in SQLite and not looking back, so
once again workarounds rule!)
--
Phlip
http://www.greencheese.u...
<-- NOT a blog!!!
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
rails mysql db:migrate etc
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password