Captious Lives!
It’s alive! Everything is still mostly the same, but we’ve brushed off some dust and breathed some air into it.
It’s alive! Everything is still mostly the same, but we’ve brushed off some dust and breathed some air into it.
One week in and still stumbling slowly along.
gem install postgres-pr.Start > Settings > Control Panel > System > Advanced > Environment Variables > PATH > edit. Append the path to the Postgres \bin to the end of the value.rails -d Postgres appName) when you’re creating a new Rails application will configure database.yml with the correct adapter. Otherwise, it’s just a matter of changing the adapter value from sqlite or mysql to postgresql. Similarly, migrating for an existing application will only require changing the settings in database.yml.Start > Programs > PostgreSQL 8.3 > SQL Shell
CREATE DATABASE db_name; adhere Rails convention to create and name the 3 databases. If successful, CREATE DATABASE will echo back at you.Start > Programs > PostgreSQL 8.3 > pgAdmin III
rake db:migrate.\c db_name.\dt to list the tables that should have been created during the migration.Servers > PostgreSQL 8.3 > Databases > db_name > Schemas > public > tables.Trying to learning Ruby on Rails is driving me absolutely insane for a number of reasons:
But hope is not lost. Ruby on Rails 2.1.x is an up-to-date tutorial that will guide you through everything. It gets into ground-level details without all the frills that Rails has to offer, teaching you the basics including Rails conventions and paradigms. It even explains how you can use Scaffold, but at the end when you have a grasp about how you could write the code on your own.
In addition RubyLearning.com was extremely helpful in getting me caught up on the Ruby language.
Even with this, I did not get by without cursing a few times.
gem install mysql. Be sure to restart the web server: CTRL+C on the server console followed by ruby script/server.ruby script/generate model modelName, a migration was automatically generated called yyyymmdd_modelName.rb. So when I generated a migration explicitly , I got an error telling me a table already exists. Login to mysql using your username and password, (mysql -u root in my case) and drop the tables and migration schema: drop table modelName; drop table schema_migrations. Follow-up by recreating the tables (this time, with all the required fields) using the migration scripts: rake db:migrate.Utilities > Global Options > Editing. Under “Change settings for mode”, select rhtml. Uncheck “Use default settings”. In the “File name glob” field, add *.html.erb” or alternative, change it to “*.{rhtml,html.erb}”. Apply.A few hours later, I have my first app!