I am running the newest ubuntu version (6.1 or so). and i installed the
mysql server with
apt-get install mysql-server
or something like that.
My mysql server works fine, and i can access it also with phpmyadmin or
other mysql tools.
I have installed ruby on rails and have started creating a project:
rails testapplication
That was successfull and I edited the database.yml file and setted up my
database info (database already existing in mysql).
When I now start WEBrick and pointing my browser to localhost:3000, I
get the nice start page… (welcome abroad) but there is also a “Rails
needs to know your login and password.” on that.
?!?
I have also built a test.rb file, which can connect to mysql and puts
out the current mysql server version…
You’ve got to delete that file (as it says on that page) to see your
rails
application. Delete public/index.html, and create a controller/scaffold
or
two, and set up the routes.rb well. Following a tutorial somewhere would
help.
You’ve got to delete that file (as it says on that page) to see your
rails
application. Delete public/index.html, and create a controller/scaffold
or
two, and set up the routes.rb well. Following a tutorial somewhere would
help.
Vish
nope… i can not create a controller… rails says that it can not
connect to the mysql server. I now believe that my mysql server not
accepts any TCP connections from ruby (same also in phpmyadmin:
phpmyadmin only connects via unix sockets, either i defined in
phpmyadmin’s config.inc.php to connect over tcp or sockets…)
ubuntu does not have this in the place rails assumes.
regards,
_c
Hi Christophe
Not tried yet. But thank you, I have looked where my mysql socket is
(also /var/run/mysqld/mysqld.sock), changed the database.yml as you said
and saved it… Then, i did a restart of both mysql server and WEBrick…
hey i don’t think i have libmysql-ruby installed at all, either through
atp or gems. does rails have the functionality built in, because rails
works fine on my system?
anyway, humor me and try uninstalling mysql-ruby, and also double check
you don’t have it installed twice through gems and atp. have no idea if
it will work but give it a shot.