Category «Rails»

Autoloading Classes when Deserializing YAML Objects (or, What Is This YAML::Object?)

Rails will automatically load Ruby files from your /app, /lib, and other directories when you use the appropriately named constant. For example, if you use the name RailsExampleObject in your code, Rails will automatically look for a file called rails_example_object.rb and load it. However, this autoloading of classes fails when deserializing objects from YAML. This …

How I Set Up a New Web App

Create the directory, and run git init Add the repository to gitosis, add users, add webadmin with readonly access Initialize the Rails project, with rails . Initialize Capistrano, with capify . Add the .gitignore file Rename config/database.yml to config/database.[USER].yml, and softlink database.yml to that file, modifying it as necessary Modify the file config/deploy.rb; see other …