<?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>UnderGrid Network Services &#187; ruby</title>
	<atom:link href="http://blog.undergrid.net/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.undergrid.net</link>
	<description>A fresh new alternative to your consulting needs with a personal touch</description>
	<lastBuildDate>Thu, 20 Jan 2011 23:33:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ruby on Rails hosting by Web.com</title>
		<link>http://blog.undergrid.net/2010/02/07/ruby-on-rails-hosting-by-web-com/</link>
		<comments>http://blog.undergrid.net/2010/02/07/ruby-on-rails-hosting-by-web-com/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 01:52:42 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web.com]]></category>

		<guid isPermaLink="false">http://blog.undergrid.net/?p=14</guid>
		<description><![CDATA[Usually in the past I&#8217;ve done my web hosting on either one of the many servers I own or utilizing VPS hosting providers like VPSfarm.com, GrokThis.net or Linode.com, but lately with the economy and a price that can&#8217;t be beat I&#8217;ve been using Web.com&#8216;s Linux Hosting plan to meet my needs. This has met all my [...]]]></description>
			<content:encoded><![CDATA[<p>Usually in the past I&#8217;ve done my web hosting on either one of the many servers I own or utilizing VPS hosting providers like <a href="http://vpsfarm.com" target="_blank">VPSfarm.com</a>, <a href="http://grokthis.net" target="_blank">GrokThis.net</a> or <a href="http://linode.com" target="_blank">Linode.com</a>, but lately with the economy and a price that can&#8217;t be beat I&#8217;ve been using <a href="http://www.web.com" target="_blank">Web.com</a>&#8216;s Linux Hosting plan to meet my needs. This has met all my requirements except one, I couldn&#8217;t run my Ruby on Rails applications that I was working on development for using their services. Well until now that is&#8230; Thanks in part to a great Systems Engineer that I&#8217;ve had the pleasure of working with and knowing great strides had been made to improve the feature set to the level that a power user like myself would appreciate adding even more value to the offering.</p>
<p>Recently there had been work being done to add FastCGI access to the Linux Hosting plan which already offers PHP5, Python 2.4 and Perl 5. Ruby is still not available on the system as a whole; however, that doesn&#8217;t stop you from adding it to your own account which is precisely what I did. Armed with the ability to test out FastCGI I proceeded to work on getting a very simple test RoR app setup and running.</p>
<p><span id="more-14"></span>To start with I needed to get Ruby installed. To do this I simply logged into my shell account (another great feature of Web.com&#8217;s Linux Hosting) and proceeded to download the necessary sources:</p>
<blockquote>
<div>$ wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz</div>
<div>$ wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz</div>
</blockquote>
<p>With the source downloaded I then extracted them into the tmp/ directory in my account and built them.</p>
<blockquote>
<div>$ tar -xzf ruby-1.8.7-p174.tar.gz -C tmp/</div>
<div>$ tar -xzf rubygems-1.3.5.tgz -C tmp/</div>
<div>$ cd tmp/ruby-1.8.7-p174/</div>
<div>$ ./configure &#8211;prefix=$HOME</div>
<div>$ make</div>
<div>$ make install</div>
<div>$ cd ~/tmp/rubygems-1.3.5/</div>
<div>$ ruby setup.rb</div>
</blockquote>
<p>With this completed you should have Ruby 1.8.7 and RubyGem 1.3.5 ready to go. You can test by running the following couple of commands:</p>
<blockquote>
<div>$ ruby -v</div>
<div>ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux]</div>
<div>$ gem -v</div>
<div>1.3.5</div>
</blockquote>
<p>Now we&#8217;re ready to rock and roll&#8230; We just need a few gems to be thrown in and we&#8217;ll have Ruby on Rails ready to go and be able to use MySQL for the database. So we&#8217;ll start off with the basics&#8230;</p>
<blockquote><p>$ gem install rails mysql fcgi</p></blockquote>
<p>This should install any other gems that are necessary for dependencies and you can check the final list of gems installed running <strong><em>gem list</em></strong> later if you&#8217;re curious to see them all. Now would also be a good time to go ahead and clean-up your tmp/ directory as you won&#8217;t be needing all that source any more so why use up the disk resources.</p>
<p>Now we just need a Rails application to run, so we&#8217;ll start out with building one from scratch although if you have one ready to go then you could just upload it to your home directory. For purposes of this I&#8217;m just going to setup a Rails webapp aptly called &#8220;<strong>test</strong>&#8221; as follows:</p>
<blockquote><p>$ rails -D -d mysql ~/test</p></blockquote>
<p>Now we just need to go create our webapps public/.htaccess file with the necessary configuration settings. For my example I used the following for my .htaccess file:</p>
<blockquote>
<div>Options +FollowSymLinks +ExecCGI</div>
<div>&lt;IfModule mod_fastcgi.c&gt;</div>
<div style="padding-left: 30px;">AddHandler fastcgi-script .fcgi</div>
<div>&lt;/IfModule&gt;</div>
<div>&lt;IfModule mod_rewrite.c&gt;</div>
<div style="padding-left: 30px;">RewriteEngine On</div>
<div style="padding-left: 30px;">RewriteRule ^$ index.html [QSA]</div>
<div style="padding-left: 30px;">RewriteRule ^([^.]+)$ $1.html [QSA]</div>
<div style="padding-left: 30px;">RewriteCond %{REQUEST_FILENAME} !-f</div>
<div style="padding-left: 30px;">RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]</div>
<div>&lt;/IfModule&gt;</div>
</blockquote>
<p>Armed with this we just need to setup the virtual host. I set this up as test.example.com so it ran isolated from my regular non-Rails website. To do this I logged into my support account (outside scope of this entry) and setup <strong>test.example.com</strong> as a website content path as <strong>/test/public</strong>. Then while still logged into the support site created the necessary database tables <strong>test_development</strong> and <strong>test_production</strong>. You could also setup separate database uses at this time for the databases as well if you liked.</p>
<p>Once the databases were created I needed to edit the <strong>test/config/database.yml</strong> file with the necessary database name and credentials. Also set the database host to the appropriate hostname provided for your account. You&#8217;ll then need to setup and migrate the database.</p>
<blockquote>
<div>$ cd ~/test</div>
<div>$ rake db:migrate</div>
<div>$ rake db:setup</div>
</blockquote>
<p>Everything done you&#8217;re now ready to test it out and see if it all works. If you open up your browser and go to <a href="http://test.example.com">http://test.example.com</a> and you should see the default Ruby on Rails welcome page. If you click on the &#8220;About your application&#8217;s environment&#8221; link it should drop-down and show you the version information for your Rails application. From here you&#8217;re ready to begin the rest of your webapp development.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.undergrid.net%2F2010%2F02%2F07%2Fruby-on-rails-hosting-by-web-com%2F';
  addthis_title  = 'Ruby+on+Rails+hosting+by+Web.com';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.undergrid.net/2010/02/07/ruby-on-rails-hosting-by-web-com/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Looking for Rails assistance</title>
		<link>http://blog.undergrid.net/2008/08/01/looking-for-rails-assistance/</link>
		<comments>http://blog.undergrid.net/2008/08/01/looking-for-rails-assistance/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 03:23:19 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.undergrid.net/?p=6</guid>
		<description><![CDATA[So we&#8217;re currently working on an adult-oriented website in Ruby on Rails. The project is pretty daunting so we&#8217;re looking for potential assistance in putting some of the pieces together. If you have any Rails experience, are interested and don&#8217;t have a problem working on an adult-oriented website then please get in touch with a [...]]]></description>
			<content:encoded><![CDATA[<p>So we&#8217;re currently working on an adult-oriented website in Ruby on Rails. The project is pretty daunting so we&#8217;re looking for potential assistance in putting some of the pieces together.</p>
<p>If you have any Rails experience, are interested and don&#8217;t have a problem working on an adult-oriented website then please get in touch with a sample of your work. Given the nature of the site and the fact it is in stealth development mode we have to be vague on the details at this time.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.undergrid.net%2F2008%2F08%2F01%2Flooking-for-rails-assistance%2F';
  addthis_title  = 'Looking+for+Rails+assistance';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.undergrid.net/2008/08/01/looking-for-rails-assistance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

