Tutorials & Code Snips |
Categories |
|
Best Practices (3)
Components (1)
Configuration (5)
Database (13)
Deployment (6)
Design (1)
Gems (1)
Getting Started (11)
Miscellaneous (2)
Plugins (2)
Scripting (2)
Server (3)
Templates (2)
Testing (8)
Web Services (2)
XML (1)
|
| Listings |
| There are 69 listings in this category. Add your listing here |
|
Shovel—Rails Deployment with Lighttpd
Shovel is a customized Capistrano deployment file to setup config files on TextDrive in order to make it easier to start running Rails with lighttpd. It could also be modified to work with other shared hosts who run lighttpd.
(Hits: 227 | Votes: 0 | Visited: 70 | Added: 2006-05-22 12:47:04)
|
|
Rails Routing demystified
The routing module provides URL rewriting in native Ruby. It’s a way to redirect incoming requests to controllers and actions. This replaces mod_rewrite rules. Best of all Rails’ Routing works with any web server. Routes are defined in routes.rb in your RAILS_ROOT/config directory
(Hits: 227 | Votes: 0 | Visited: 80 | Added: 2006-07-16 00:27:19)
|
|
Why and How: Ruby (and Rails) Unit Testing
One thing I love about Ruby is the built in unit tests. As someone who is working to use better developing methodologies, having unit testing avaliable with no effort makes it that much easier to try out things like Test Driven Development. Unit testing also has an important place in Rails development. I enjoyed the format of my article on migrations, so we’ll try that again. The why and how of unit testing, coming right up....
(Hits: 227 | Votes: 0 | Visited: 62 | Added: 2006-05-22 13:48:41)
|
|
Rails Testing Guide: The Lo-Down on Fixtures The structure is one thing, but what about when I want to automatically create sample data? Enter fixtures. Fixtures is a fancy word for ‘sample data’. Fixtures allow you to populate your testing database with predefined data before your tests run. Fixtures are database independent and assume one of two formats: YAML or CSV.
(Hits: 227 | Votes: 0 | Visited: 65 | Added: 2006-05-30 13:13:48)
|
|
How to Use Configuration Files
The database.yml file has a hidden option for those whose mysql.sock file does not reside at the default /tmp/mysql.sock location. To change the socket, add the following line (for example) to each of the configurations in database.yml:
production: socket: /var/run/mysqld/mysqld.sock The config directory can also be used for application configuration.
(Hits: 228 | Votes: 0 | Visited: 62 | Added: 2006-05-30 13:21:08)
|
|
Easy migration between Databases
Tobias Lütke needed to migrate a database from one architecture to another but needed to copy the data across intact. To ensure that the format would be architecture agnostic, he's created a plugin that dumps the data to YAML and then reloads it back into the database at the other end. It's a simple rake task, and Tobi gives quick and easy instructions.
(Hits: 228 | Votes: 0 | Visited: 70 | Added: 2006-07-16 00:30:22)
|
|
Dump or Slurp YAML Reference Data (and Fixtures)
Sometimes you need to save data and use it again when you deploy a server or continue a project on a different machine.
I wrote a plugin for ActiveRecord that lets you do this easily. It adds two class methods that let you dump_to_file and load_from_file. The contents are written to the ‘db’ directory with the table name as the filename. When you call Model.load_from_file, existing data in that table is deleted and reloaded, but primary key id’s are kept intact. ...
(Hits: 228 | Votes: 0 | Visited: 68 | Added: 2006-05-22 12:50:02)
|
|
The Joy of Migrations
Migrations are one of the more exciting features in Rails today. I think they’re wonderful and that they should be used. I’ll go over how any why you should use these gems...
(Hits: 228 | Votes: 0 | Visited: 73 | Added: 2006-05-22 13:47:31)
|
|
How to Use Rsync To Deploy Your Application
You can use rsync with Rake to quickly deploy changes to your application on your remote host. For this you have to define a new Rake task in your Rakefile in the application directory:
(Hits: 228 | Votes: 0 | Visited: 61 | Added: 2006-05-30 13:27:47)
|
|
<< Start < Prev 1 2 3 4 5 6 7 8 Next > End >> |