Installing on Ubuntu

Hello,

I am having problems installing Radiant on my ubuntu machine here is the
output

$ ruby script/setup_database production
Run setup_database --help for information on additional options.

Loading production environment…FAILED
/usr/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 5, col 2:
socket: /tmp/mysql.sock’ (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in load' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:459:indatabase_configuration’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:181:in
initialize_database' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:84:inprocess’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in
run' from ./script/../config/environment.rb:15 from script/setup_database:78:inload_environment’
from script/setup_database:258:in announce' from script/setup_database:77:inload_environment’
from script/setup_database:17:in run' from script/setup_database:9:inrun’
from script/setup_database:297

I took a look at the file, but nothing seems to be wrong. Any help would
be
greatly appreciated

Sara Vasquez

Hi Sara

Try checking the path to your mysql.sock file, in the database yml
file in your radiant config folder… it may not be ‘/tmp/mysql.sock’
on your system…

Cheers,

Michael

Hi Sara,

on my machine (Ubuntu 6.10 Edgy Eft) the value for ‘socket:’
(in ‘config/database.yml’) is set to: ‘/var/run/mysqld/mysqld.sock’.
Hope that helps.

Best regards,
Andreas S.

Sara schrieb:

The problem is definitely with the format of the database
configuration file. You should post the entirety of that file
(preferably as an attachment).

Semt,
I know I created a symlink to it and it still did not work and then I
just
deleted the link and just enter the /vr/run/ location and now I get the
same
eror just with that location
$ruby script/setup_database production

Run setup_database --help for information on additional options.

Loading production environment…FAILED
/usr/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 5, col 2:
socket:/var/run/mysqld/mysqld.sock’ (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in load' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:459:indatabase_configuration’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:181:in
initialize_database' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:84:inprocess’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in
run' from ./script/../config/environment.rb:15 from script/setup_database:78:inload_environment’
from script/setup_database:258:in announce' from script/setup_database:77:inload_environment’
from script/setup_database:17:in run' from script/setup_database:9:inrun’
from script/setup_database:297

anyone has any other ideas as to what could be wrong.

Sara Vasquez

Jim,

Thanks so if I understand that correctly you deleted the sockets lines
all
together and instead wrote a
host:127.0.0.1 instead?

I’m running Dapper and had this problem too. What worked for me was
removing
the socket lines from database.yml and using host: 127.0.0.1 instead.

Hope that help!

Jim

Great Tutorial on setting up rails on Ubuntu.

I have been so tired of using Windows XP that this weekend I managed to
setup a dual boot system with my current Windows XP install and my new
favorite operating system Ubuntu.

I used this tutorial to get my ROR up and running.
http://paulgoscicki.com/archives/2005/09/ruby-on-rails-on-ubuntu/

Everything worked according to plan and today I am back coding in Ruby
on Rails in my Linux environment.

If you are still using Windows, I suggest you take a look at Ubuntu it
is fairly easy to install if you can follow directions.
You won’t be disappointed with this OS and hos much faster and
friendlier it is to use.

100% agree

have ubuntu server 7.04 up and running along with mysql + ror + mongrel
also
acting
as my home router for small network.

perfect system for people who want to close windows :slight_smile:

All,

i keep on getting the same error, I have no idea what might be going
wrong
since I managed to install both mephisto and RAM so I am lost as to what
is
going wrong. Loading production environment…FAILED
/usr/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 5, col 2:
host: localhost’ (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in load' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:459:indatabase_configuration’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:181:in
initialize_database' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:84:inprocess’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in
run' from ./script/../config/environment.rb:15 from script/setup_database:78:inload_environment’
from script/setup_database:258:in announce' from script/setup_database:77:inload_environment’
from script/setup_database:17:in run' from script/setup_database:9:inrun’
from script/setup_database:297

All,
If I try that I get this
$ ruby script/setup_database production
Run setup_database --help for information on additional options.

Loading production environment…FAILED
/usr/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 7, col -3:test: (ArgumentError)
adapter: mysql
database: radiant_test
username: myusername
password: mypassword

production:
adapter: mysql
database: radiant_live
username: myusername
password:mypassword
’ from /usr/lib/ruby/1.8/yaml.rb:133:in load' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:459:indatabase_configuration’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:181:in
initialize_database' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:84:inprocess’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in
run' from ./script/../config/environment.rb:15 from script/setup_database:78:inload_environment’
from script/setup_database:258:in announce' from script/setup_database:77:inload_environment’
from script/setup_database:17:in run' from script/setup_database:9:inrun’
from script/setup_database:297
tikal26@tikal26-desktop:/usr/lib/ruby/gems/1.8/gems/radiant-0.5.2$ ruby
script/server webrick -e production
=> Booting WEBrick…
/usr/lib/ruby/1.8/fileutils.rb:243:in mkdir': Permission denied - tmp (Errno::EACCES) from /usr/lib/ruby/1.8/fileutils.rb:243:infu_mkdir’
from /usr/lib/ruby/1.8/fileutils.rb:217:in mkdir_p' from /usr/lib/ruby/1.8/fileutils.rb:215:inmkdir_p’
from /usr/lib/ruby/1.8/fileutils.rb:201:in mkdir_p' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/server.rb:29 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’

from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require’
from script/server:3

Sara,

Indeed if you delete the socket line and use either 127.0.0.1 or just
plain ol’ localhost works fine.

Ruben D. Orduz wrote:

Sorry to hear you’re having such a hard time getting Radiant to work.
You can write me directly if you want, so we don’t bother the rest.

If you continue off list, please post the solution here. It’s helpful
when people are searching through the archives for the same problem in
the future.


John L.
http://wiseheartdesign.com

Ruben,
Gracias, I did so many thing that it strated to work it was probably a
cross-OS problem like you said, but now ig et the following error
Run setup_database --help for information on additional options.

Loading development environment…Rails Error: Unable to access log
file.
Please ensure that script/…/config/…/log/development.log exists and is
chmod 0666. The log level has been raised to WARN and the output
directed to
STDERR until the problem is fixed.
OK

WARNING! This script will overwrite information currently stored in the
database “radiant_dev”. Are you sure you want to continue? [Yn] Y

Creating tables…
– drop_table(“config”)
– create_table(“config”, {:force=>true})
FAILED
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:330:in
`real_connect’: Can’t connect to local MySQL server through
socket ‘/var/run/mysqld/mysqld.sock’ (13) (Mysql::Error)

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:330:in
`connect’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:87:in
`initialize’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:36:in
`mysql_connection’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in
`connection_without_query_cache=’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/query_cache.rb:54:in
`connection=’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:220:in
`retrieve_connection’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
`connection’

from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:273:in
method_missing' ... 8 levels... from script/setup_database:99:increate_tables’
from script/setup_database:19:in run' from script/setup_database:9:inrun’
from script/setup_database:297

I am somehow confuces since I was able to installed it before in
bluehost and
I think that right now I might just take a little break since I think
that I
am just not thinking straight . I know I am probably being a pain, but
if
anyone could provide me with some help I would appreciated it.

Sara Vasquez

John, will do. I’m almost certain it has to do with formating
(spacing/tabs) of her DB config files.

Here’s what my database.yml looks like for my Radiant install on
Unbuntu:

production:
adapter: mysql
database: cr_radiant_live
username: user
password: password

I’m running on SliceHost. My RAILS_ENV is production (obviously).

Cheers,
Chris

Sara,

Sorry to hear you’re having such a hard time getting Radiant to work.
You can write me directly if you want, so we don’t bother the rest. I
need to know the following:

  • Are you sure mysqld is running?
  • Are you developing on windows?
  • Can you copy and paste both your db yml file and the db setup script?

Sara,

Other people have had problem with yml files since they ARE tab- and
space-sensitive. Make sure you’re editing them in a text-safe
environment and that there’s no cross-OS problems. Also, you can try
doing a SVN revert on that yml file and make sure you don’t mess with
the spacing or tabs.

I believe I took the sample file and whacked the socket entry.

no host specified? Or did you purposely ommited it?