<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>danielsenhwong.com &#187; ruby on rails</title>
	<atom:link href="http://blog.danielsenhwong.com/tag/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.danielsenhwong.com</link>
	<description></description>
	<lastBuildDate>Tue, 22 Feb 2011 01:54:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Setting up Ruby on Rails in OS X</title>
		<link>http://blog.danielsenhwong.com/2011/01/setting-up-ruby-on-rails-in-os-x/</link>
		<comments>http://blog.danielsenhwong.com/2011/01/setting-up-ruby-on-rails-in-os-x/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 00:54:01 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.danielsenhwong.com/?p=96</guid>
		<description><![CDATA[I consulted quite a few sources online to try and figure out how to do this, and ran into a few problems that took entirely too much time to solve. Now that I&#8217;ve figured them out, I&#8217;m writing the solutions here in the event I need them again. Hopefully they&#8217;ll be useful to a few [...]]]></description>
			<content:encoded><![CDATA[<p>I consulted quite a few sources online to try and figure out how to do this, and ran into a few problems that took entirely too much time to solve. Now that I&#8217;ve figured them out, I&#8217;m writing the solutions here in the event I need them again. Hopefully they&#8217;ll be useful to a few other people as well.</p>
<p><strong>Goals</strong></p>
<p>Create a Ruby on Rails development environment with Apache, MySQL, and PHP.</p>
<p>There are several possible ways of doing this, but since OS X is a Unix-based platform, I don&#8217;t see any reason to use pre-compiled packages like MacPorts and replacing the built-in software. Plus, this is supposed to be a learning experience.</p>
<p><strong>Sources</strong></p>
<p><a href="http://maestric.com/doc/mac/apache_php_mysql_snow_leopard">http://maestric.com/doc/mac/apache_php_mysql_snow_leopard</a></p>
<p><a href="http://michaelgracie.com/2009/09/23/plugging-mcrypt-into-php-on-mac-os-x-snow-leopard-10.6.1/">http://michaelgracie.com/2009/09/23/plugging-mcrypt-into-php-on-mac-os-x-snow-leopard-10.6.1/</a></p>
<p><span id="more-96"></span></p>
<p><strong>Basic Setup</strong></p>
<p>OS X comes with Apache, Ruby, Rails, and PHP pre-loaded; the specific versions of each are dependent upon the installed version of OS X. In my case, I am starting with a fresh installation of Snow Leopard (10.6), and beginning by downloading all available System Updates, which brings my system to version 10.6.5, with Apache version 2.2.15, Ruby 1.8.7, Rails 2.3.5 , and PHP 5.3.3.</p>
<p>In order to use the pre-loaded Apache installation, go to &#8220;System Preferences&#8221; &gt; &#8220;Sharing&#8221;  and check &#8220;Web Sharing&#8221;. This will enable the Apache web server. If you ever need to restart the server, either uncheck and re-check this box, or use the command &lt;code&gt;sudo apachectl restart&lt;/code&gt; from the command line.</p>
<p>Next, we need a compiler, so we&#8217;ll install Apple&#8217;s Xcode Developer Tools, which can be found on the OS X installation CD/DVD and also online directly from Apple (<a href="http://developer.apple.com/technologies/tools/xcode.html">http://developer.apple.com/technologies/tools/xcode.html</a>). I have version 3.2.3 installed. I&#8217;m writing this up after having performed all of the updates, so the initial version may have been different.</p>
<p><strong>MySQL</strong></p>
<p>MySQL doesn&#8217;t come installed as part of the normal OS X distribution; just OS X Server. No problem; just download an OS X *.dmg package for MySQL Community Server: <a href="http://www.mysql.com/downloads/mysql/#downloads">http://www.mysql.com/downloads/mysql/#downloads</a></p>
<p>Note: OS X Snow Leopard (10.6) and later compile in 64-bit C, so be sure to download the 64-bit version of MySQL (x86_64 suffix). This took me a while to figure out, as I had downloaded the 32-bit version for my 32-bit kernel. I thought it made sense. Version 5.1 should work just fine; I didn&#8217;t try 5.5.</p>
<p>Anyway, the MySQL *.dmg contains three files: the MySQL installer, the MySQL Startup Item installer, and the Preference Pane item. Install them in the order I have listed here. Once it&#8217;s installed, go ahead and try starting the server. The indicator in the Preference Pane item should turn green.</p>
<p>Edit /etc/profile and add &#8220;PATH=$PATH:/usr/local/mysql/bin&#8221;, otherwise you&#8217;ll have to type the full path to the mysql and mysqladmin executables in order to use them.</p>
<p><strong>PHP</strong></p>
<p>You&#8217;ll need to enable PHP by un-commenting a line beginning with &#8220;LoadModule php5_module&#8230;&#8221; in your Apache configuration file, typically found at /private/etc/apache2/apache2.conf.</p>
<p>Additionally, you&#8217;ll have to create a php.ini file in /etc/, which is most easily done by making a copy of &#8220;/etc/php.ini.default&#8221;. While you&#8217;re doing that, un-comment the line for your time zone, and enter a valid value. Additionally, change the three occurrences of &#8220;/var/mysql/mysql.sock&#8221; to &#8220;/tmp/mysql.sock&#8221; in order to point PHP at your MySQL installation.</p>
<p>I like using phpMyAdmin to manage my MySQL databases, so I&#8217;ll need to install this. The process is straightforward and well-documented. However, once you do this, you&#8217;ll notice that you&#8217;ll need PHP to have been compiled with the mcrypt extension, and the OS X distribution hasn&#8217;t been. Not to worry, Michael Gracie has a solution to that problem (<a href="http://michaelgracie.com/2009/09/23/plugging-mcrypt-into-php-on-mac-os-x-snow-leopard-10.6.1/">http://michaelgracie.com/2009/09/23/plugging-mcrypt-into-php-on-mac-os-x-snow-leopard-10.6.1/</a>).  Be sure to update the version numbers of the different software packages accordingly.</p>
<p>Restart the Apache server so these changes to php.ini take effect.</p>
<p><strong>Ruby on Rails</strong></p>
<p>I&#8217;m going to be using Rails 3.0, so I&#8217;ll need to update RubyGems with &#8220;sudo gem update &#8211;system&#8221; followed by &#8220;sudo gem update&#8221; to update all installed gems.</p>
<p>I&#8217;ll need to install a database adapter so that RoR can interface with MySQL. Rails 3 defaults to the mysql2 gem for MySQL databases, so we&#8217;ll install that with &#8220;sudo gem install mysql2 &#8212; &#8211;with-mysql-config=/usr/local/mysql/bin/mysql_config&#8221;.</p>
<p>I want to use the devise plugin for user authentication, so I&#8217;ll install that and its dependent gem, warden.</p>
<p>Finally, I want to use passenger to deploy my Rails application just to make my life easier: &#8220;sudo gem install passenger&#8221; followed by &#8220;sudo passenger-install-apache2-module&#8221; and follow the directions.</p>
<p><strong>Done!</strong></p>
<p>I was going to write more about configuring virtual hosts, but this post languished with &#8220;draft&#8221; status for over a week already.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.danielsenhwong.com/2011/01/setting-up-ruby-on-rails-in-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Counting records by category [RoR]</title>
		<link>http://blog.danielsenhwong.com/2010/10/counting-records-by-category-ror/</link>
		<comments>http://blog.danielsenhwong.com/2010/10/counting-records-by-category-ror/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 18:10:09 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.danielsenhwong.com/?p=94</guid>
		<description><![CDATA[In my Rails application, I have an inventory of items described by three models: the items (cryovials), the place they&#8217;re stored (dewar), and the information about which vials is stored where (ln2_locations). The reason I used three models, rather than rolling the attributes of the third (ln2_locations) into the actual item was that in reality, [...]]]></description>
			<content:encoded><![CDATA[<p>In my Rails application, I have an inventory of items described by three models: the items (<strong>cryovials</strong>), the place they&#8217;re stored (<strong>dewar</strong>), and the information about which vials is stored where (<strong>ln2_locations</strong>).</p>
<p>The reason I used three models, rather than rolling the attributes of the third (<strong>ln2_locations</strong>) into the actual item was that in reality, we normally freeze down multiple vials with the same content at the same time.  I would like to implement this kind of mass assignment at a later time.</p>
<p>Anyway, it is often useful to be able to determine what we have stored, and how much of each different type of content is present. It&#8217;s one thing to know what the SQL code would be to retrieve these records; it&#8217;s another to convert that to an ActiveRecord query when you&#8217;re just learning.</p>
<p>What I would like to do is look at my items (<strong>cryovials</strong>), and pull out the unique content values (e.g. cell types), then go back and count how many vials I have with that content. It would be pretty easy to accomplish this as two separate statements, but that would involve iteration and two separate SQL queries. Best to leave it as one query where I count and select unique fields simultaneously:</p>
<p>Rails:</p>
<pre class="brush: ruby; title: ;">@summary = Ln2Location.select(&amp;quot;count(*) count, contents&amp;quot;).joins(:cryovial).where(:present =&gt; true).group(:contents)</pre>
<p>SQL:</p>
<pre class="brush: sql; title: ;">SELECT count(*) count, contents FROM `ln2_locations` INNER JOIN `cryovials` ON `cryovials`.`id` = `ln2_locations`.`cryovial_id` WHERE (`ln2_locations`.`present` = 1) GROUP BY contents</pre>
<p>I&#8217;m selecting on Ln2Locations because there&#8217;s a property, &#8220;present,&#8221; which I&#8217;m using to select only the vials which haven&#8217;t been physically removed from the collection. Additionally, the relationship between the models is as follows:</p>
<pre class="brush: ruby; title: ;">class Cryovial &lt; ActiveRecord::Base
# Relationships
belongs_to :user
has_many :dewars, :through =&gt; :ln2_location
has_many :ln2_locations
accepts_nested_attributes_for :ln2_locations
</pre>
<pre class="brush: ruby; title: ;">class Dewar &lt; ActiveRecord::Base
# Relationships
belongs_to :laboratory
belongs_to :location
has_many :cryovials, :through &lt; :ln2_locations</pre>
<pre class="brush: ruby; title: ;">class Ln2Location &lt; ActiveRecord::Base
# Relationships
belongs_to :dewar
belongs_to :cryovial</pre>
<p>So only the child model, Ln2Locations, contains the foreign key that would be used to generate the join table.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.danielsenhwong.com/2010/10/counting-records-by-category-ror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails: Integrating Devise</title>
		<link>http://blog.danielsenhwong.com/2010/10/ruby-on-rails-integrating-devise/</link>
		<comments>http://blog.danielsenhwong.com/2010/10/ruby-on-rails-integrating-devise/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 03:57:26 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[devise]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.danielsenhwong.com/2010/10/ruby-on-rails-integrating-devise/</guid>
		<description><![CDATA[It is possible to integrate devise into your rails app as part of your user model in order to provide authentication support. - add desired attributes to migration file - make added attributes accessible in model file - either roll your own views or add fields to generated views That&#8217;s it. It really isn&#8217;t difficult [...]]]></description>
			<content:encoded><![CDATA[<p>It is possible to integrate devise into your rails app as part of your user model in order to provide authentication support.</p>
<p>- add desired attributes to migration file<br />
- make added attributes accessible in model file<br />
- either roll your own views or add fields to generated views</p>
<p>That&#8217;s it. It really isn&#8217;t difficult or different than making any other model.</p>
<p>I was worried that it would be complicated, and spent a lot of time reading about devise to be sure. It&#8217;s so easy, no one writes about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.danielsenhwong.com/2010/10/ruby-on-rails-integrating-devise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database Optimization: Indexing</title>
		<link>http://blog.danielsenhwong.com/2010/10/database-optimization-indexing/</link>
		<comments>http://blog.danielsenhwong.com/2010/10/database-optimization-indexing/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 14:26:38 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.danielsenhwong.com/?p=92</guid>
		<description><![CDATA[After installing devise, I was looking through the migration file, and noticed a couple add_index commands. Reading up on what this actually does, I came across a couple interesting articles about database optimization: Optimizing your MySQL Application Indexing for DB performance details: http://www.railsbrain.com/api/rails-2.0.2/doc/index.html?a=M001468&#38;name=add_index I don&#8217;t plan to build a giant Rails application, but Rails is [...]]]></description>
			<content:encoded><![CDATA[<p>After installing devise, I was looking through the migration file, and noticed a couple add_index commands. Reading up on what this actually does, I came across a couple interesting articles about database optimization:</p>
<p><a href="http://articles.sitepoint.com/print/optimizing-mysql-application">Optimizing your MySQL Application</a></p>
<p><a href="http://weblog.jamisbuck.org/2006/10/23/indexing-for-db-performance">Indexing for DB performance</a></p>
<p>details: <a href="http://www.railsbrain.com/api/rails-2.0.2/doc/index.html?a=M001468&amp;name=add_index">http://www.railsbrain.com/api/rails-2.0.2/doc/index.html?a=M001468&amp;name=add_index</a></p>
<p>I don&#8217;t plan to build a giant Rails application, but Rails is known to have scalability issues. Still good to be aware of these points.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.danielsenhwong.com/2010/10/database-optimization-indexing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails: on shared hosting, user authentication</title>
		<link>http://blog.danielsenhwong.com/2010/10/ruby-on-rails-on-shared-hosting-user-authentication/</link>
		<comments>http://blog.danielsenhwong.com/2010/10/ruby-on-rails-on-shared-hosting-user-authentication/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 20:23:44 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[customer service]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[lithium hosting]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[tech support]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[web hosting]]></category>

		<guid isPermaLink="false">http://blog.danielsenhwong.com/?p=89</guid>
		<description><![CDATA[* As usual, this post on Ruby on Rails is more documentation of my development process to supplement my notebook and memory. I can try to answer questions, but please keep in mind that I&#8217;m learning too. I&#8217;ve bought the eBook version of the 4th edition of the Pragmatic Programmers&#8217; Agile Web Development with Rails. [...]]]></description>
			<content:encoded><![CDATA[<p><em>* As usual, this post on Ruby on Rails is more documentation of my development process to supplement my notebook and memory. I can try to answer questions, but please keep in mind that I&#8217;m learning too.</em></p>
<p>I&#8217;ve bought the eBook version of the 4th edition of the Pragmatic Programmers&#8217; <span style="text-decoration: underline;"><a href="http://pragprog.com/titles/rails4/agile-web-development-with-rails">Agile Web Development with Rails</a></span>. It&#8217;s still in beta, but my main goal is to see how things have changed between Rails 2.x and Rails 3. The book also covers some basic user authentication, but it&#8217;s very simplistic. In the interest of getting my project up and going quickly, I looked into <a href="http://github.com/binarylogic/authlogic">authlogic</a> and <a href="http://github.com/plataformatec/devise">devise/warden</a>.</p>
<p>Both authlogic and devise/warden were <a href="http://www.themomorohoax.com/2009/02/21/rails-2-3-authentication-comparison">highly recommended by mischa</a> after building an application that did some direct comparisons of several different RoR user authentication solutions. Good enough for me. devise appears to be more lightweight, so I&#8217;ll try that one first.</p>
<p>A little bit about my server setup: I&#8217;m hosted with <a href="https://www.lithiumhosting.com/billing/aff.php?aff=070">Lithium Hosting</a>, which is a great deal and has fantastic customer service. They&#8217;re not paying me to pitch the service, though clicking the link above and then signing up for a plan gives me referral credits or something. It&#8217;s a shared hosting service, so I manage my site with cPanel if I need/want to, and I&#8217;ve added on SSH access to my account so I don&#8217;t really need to use cPanel.</p>
<p>Once the server upgraded to Rails 3.0/Ruby 1.8.7, a couple things happened: my rails apps stopped starting automatically (cPanel feature), cPanel could no longer start my rails apps, and I couldn&#8217;t create a new Rails app with a MySQL database.</p>
<p>Solutions:</p>
<p>1) install the <a href="http://rubygems.org/gems/mysql2">mysql2 gem</a>, which is the new mysql database adapter used by Rails 3. The compilers are disabled on my host, so this was done via support ticket.</p>
<p>2) add mongrel to my Gemfile,</p>
<p><code lang="ruby">#project/Gemfile<br />
gem 'mongrel'</code></p>
<p>Mongrel isn&#8217;t automatically started in development mode. cPanel still won&#8217;t start my application, so starting the server is done via SSH with</p>
<p><code lang="rails">rails server --port=[port]</code></p>
<p>So now I can create a new project</p>
<p><code lang="rails">rails new project --database=mysql</code></p>
<p>and start the server. However, I don&#8217;t have a good way of authenticating users.</p>
<p>So, back to the support tickets to have both authlogic and devise installed. Once tech support has done that (seven minutes. really.), check if they&#8217;re installed for me:</p>
<p><code lang="ruby">gem server --port=[port]</code></p>
<p>and navigate to mysite.com:[port]. They&#8217;re not, run a couple commands from the command line:</p>
<p><code lang="rails">gem install devise<br />
gem install authlogic</code></p>
<p>Which should install the gems and make them available to me. Checking again as above, and both devise and authlogic are present. Add the appropriate lines to my Gemfile. Then, since I&#8217;m trying out devise first, install it:</p>
<p><code lang="rails">rails generate devise:install</code></p>
<p>That&#8217;s all for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.danielsenhwong.com/2010/10/ruby-on-rails-on-shared-hosting-user-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails: Migrating data, too</title>
		<link>http://blog.danielsenhwong.com/2010/10/ruby-on-rails-migrating-data-too/</link>
		<comments>http://blog.danielsenhwong.com/2010/10/ruby-on-rails-migrating-data-too/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 15:50:40 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.danielsenhwong.com/?p=86</guid>
		<description><![CDATA[Sometimes it makes sense to re-organize information in such a way that changing the database structure is necessary. It&#8217;s not terribly difficult to do this in Ruby on Rails. I&#8217;m writing this more to file this away somewhere I won&#8217;t accidentally delete it: class CreateLn2Locations &#60; ActiveRecord::Migration def self.up # create table create_table :ln2_locations do [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it makes sense to re-organize information in such a way that changing the database structure is necessary. It&#8217;s not terribly difficult to do this in Ruby on Rails.</p>
<p>I&#8217;m writing this more to file this away somewhere I won&#8217;t accidentally delete it:<br />
<span id="more-86"></span><br />
<code lang="ruby"><br />
class CreateLn2Locations &lt; ActiveRecord::Migration<br />
def self.up<br />
# create table<br />
create_table :ln2_locations do |t|<br />
t.integer :vial_id<br />
t.integer :dewar_id<br />
t.integer :canister<br />
t.integer :cane<br />
t.integer :position<br />
t.boolean :present, :default =&gt; 1<br />
t.date :date</code></p>
<p><code lang="ruby">t.timestamps<br />
end</p>
<p># reset column information so that the model can access the database<br />
Ln2Location.reset_column_information</p>
<p># take values previous held in columns by vial model, move to ln2_location<br />
Vial.find(:all).each do |vial|<br />
Ln2Location.create(:vial_id =&gt; vial.id,<br />
:dewar_id =&gt; vial.dewar_id,<br />
:canister =&gt; vial.canister,<br />
:cane =&gt; vial.cane,<br />
:position =&gt; vial.position,<br />
:date =&gt; vial.date)<br />
end</p>
<p># remove extra columns from vials table<br />
remove_column :vials, :dewar_id<br />
remove_column :vials, :canister<br />
remove_column :vials, :cane<br />
remove_column :vials, :position<br />
remove_column :vials, :depleted<br />
end</p>
<p>def self.down<br />
# undo changes; first, add columns back to vials table<br />
add_column :vials, :dewar_id, :integer<br />
add_column :vials, :canister, :integer<br />
add_column :vials, :cane, :integer<br />
add_column :vials, :position, :integer<br />
add_column :vials, :depleted, :boolean, :default =&gt; 0</p>
<p># reset column information so the model can access the re-created columns<br />
Vial.reset_column_information</p>
<p># copy data from ln2_location records to corresponding vial record<br />
Ln2Location.find(:all).each do |ln2|<br />
Vial.find(ln2.vial_id).update_attributes(<br />
:dewar_id =&gt; ln2.dewar_id,<br />
:canister =&gt; ln2.canister,<br />
:cane =&gt; ln2.cane,<br />
:position =&gt; ln2.position<br />
)<br />
end</p>
<p></code></p>
<p><code lang="ruby"> # remove table<br />
drop_table :ln2_locations<br />
end<br />
end<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.danielsenhwong.com/2010/10/ruby-on-rails-migrating-data-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails IDE</title>
		<link>http://blog.danielsenhwong.com/2010/05/ruby-on-rails-ide/</link>
		<comments>http://blog.danielsenhwong.com/2010/05/ruby-on-rails-ide/#comments</comments>
		<pubDate>Wed, 19 May 2010 02:56:22 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[radrails]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.danielsenhwong.com/?p=78</guid>
		<description><![CDATA[I&#8217;ve been trying to get back into web development as a hobby; there are many reasons for this, but maybe the most relevant at the moment is that it has the potential to make my actual job easier. If I can develop a website as an online tool, maybe best described as a content management [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to get back into web development as a hobby; there are many reasons for this, but maybe the most relevant at the moment is that it has the potential to make my actual job easier. If I can develop a website as an online tool, maybe best described as a content management system on steroids and tailored to my needs in the lab, I can spend more time planning and performing experiments, and less time actually running the lab by doing it more efficiently.</p>
<p>Recently, I&#8217;ve been using puTTY, WinSCP, and a text editor to build this project in Ruby on Rails. The problem is, I need a lot of real estate on my screen to be able to do this effectively, and I wasn&#8217;t able to get WinSCP to open all of my script files in the same text editor window. Combine this with the fact that I had to &#8220;touch&#8221; every file from the command prompt using puTTY after making changes in the text editor, and saving the modified file to the site with WinSCP &#8212; it was really just the least efficient process for designing and building a system to make my life <em>more</em> efficient.</p>
<p>Anyway, a couple years ago, I had stumbled upon RadRails, which was then rolled into the Aptana IDE. Looked good. It had syntax highlighting, which was a big plus. However, SFTP support for remotely working on a RoR project was, at the time, only supported in the paid, &#8220;Pro&#8221; version of the Aptana Studio suite.</p>
<p>Fast forward to this afternoon, when I re-discovered the Aptana Studio and RadRails, and then found out that the &#8220;Pro&#8221; version had been scrapped, and now SFTP is available for free!</p>
<p>I&#8217;m playing around with it now, but I&#8217;m happy so far.</p>
<p><a href="http://aptana.org/">http://aptana.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.danielsenhwong.com/2010/05/ruby-on-rails-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

