Error in Rails 2.2.2
Status: 500 Internal Server Error
Can’t connect to local MySQL server through socket ‘/opt/local/var/run/mysqld/mysqld.sock’ (2)
Add the socket location to database.yml
production:
adapter: mysql
encoding: utf8
database: example_production
username: root
password: passwordie
pool: 5
socket: '/var/lib/mysql/mysql.sock'
host: 127.0.0.1
Reference: database.yml in Ruby on Rails
Tags:
database.yml,
mysql,
rails
1 Comment »
Error in Litespeed v3.3.22:
‘Ruby path’ is not set properly, Rails context is disabled!
Fix:
Litespeed Admin > Server Tab > Ruby Rails Tab > Edit > Ruby Path
Set to /usr/local/bin/ruby (does not accept relative path)
Ruby Pat
Syntax: Absolute pa/usr/local/bin/ruby
Tags:
Litespeed
No Comments »
Here’s a “hierarchal summary” of The Rails startup process from a paragliders perspective – artweb design.
By hierarchal, I mean its organized by how the code is executed. By summary, I mean things that I was interested in.
Rais app starts by running
environment.rb
- boot.rb is required (require File.join(File.dirname(__FILE__), ‘boot’))
- Defines RAILS_ROOT constant (points to Rails app location)
- branches out to different boot mechanisms for booting up Rails from the vendor/rails directory or from the Rails gem respectively
- Rails::Initializer #run called (sets $LOAD_PATH to the Rails libraries and your application)
- Rails::Initializer #run called again (this time with the config code block defined in environment.rb)
- Rails::Initializer #process called
- #load_environment (environment loaded from config/environments)
Tags:
environment.rb,
rails
No Comments »
If you want to export a subset of data (rather than the entire database or table) in CSV format:
Export subset of data with PgAdmin
- Click “Execute Arbitrary SQL queries” button
- Type query that will generate the subset of data
eg. select * from users where id >= 433 and id <= 436;
- Click “Execute query, write results to file” button (save file as
temp.csv)
Import subset of data with psql (not supported in PgAdmin yet)
copy vitals from '/temp.csv' DELIMITERS';' CSV;
The import feature will be available in PgAdmin soon.
References
A more thorough article: Importing CSV Files to PostgreSQL Databases
Tags:
CSV,
pgAdmin,
PostgreSQL
No Comments »
Posted by alex in Insights
If you use the Google Toolbar like I do then that is where you store access to all of your bookmarks. The FireFox web browser is set up by default to provide a bookmarks toolbar which if it is not used then its a waste of space. Initially it looks like the bookmarks toolbar is just part of the FireFox design however by simply unchecking the Bookmarks Toolbar as shown below in the image you gain more room for the display of web pages.

Read the rest of this entry »
Tags:
bookmarks toolbar,
FF,
firefox,
navigation,
toolbar
2 Comments »