<?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>Eric Leclerc &#187; rubyEric Leclerc</title>
	<atom:link href="http://eleclerc.ca/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://eleclerc.ca</link>
	<description>Web Developer in Gatineau</description>
	<lastBuildDate>Mon, 14 May 2012 20:15:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Exploring the ruby frameworks</title>
		<link>http://eleclerc.ca/2009/02/21/exploring-the-ruby-frameworks/</link>
		<comments>http://eleclerc.ca/2009/02/21/exploring-the-ruby-frameworks/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 14:43:23 +0000</pubDate>
		<dc:creator>Eric Leclerc</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://danceric.net/?p=179</guid>
		<description><![CDATA[I&#8217;ve started learning Ruby on Rails after reading a book about ruby. But I was soon disappointed by the fact that I wasn&#8217;t learning ruby, but &#8216;rails&#8217;, which is not the same thing for me. So, I&#8217;ve decided to go without rails for a little while. Having experience in web development I did choose to&#8230; <a href="http://eleclerc.ca/2009/02/21/exploring-the-ruby-frameworks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started learning Ruby on Rails after reading a book about ruby. But I was soon disappointed by the fact that I wasn&#8217;t learning ruby, but &#8216;rails&#8217;, which is not the same thing for me.</p>

<p>So, I&#8217;ve decided to go without rails for a little while. Having experience in web development I did choose to try the Ramaze framework, which I really like. One strange thing happened though. Once started with Ramaze, in need of some document I&#8217;ve found some screencasts on &#8216;The Pragmatic Programers&#8217; called &#8216;Classy Web Development with Sinatra&#8217;. I&#8217;ve bought both screencasts, the first screencast is a really good small introduction to Sinatra. I&#8217;ve then realized that Sinatra is really great to create an API or a quick prototype of an application. So I&#8217;ve decided to prototype my &#8216;youtube niche&#8217; application with Sinatra. Later on, my application became bigger and I felt It was wrong to continue using Sinatra for that, mainly because of the freedom (ie: lack of structure in this scenario), so I went back on Ramaze. The wonderful things that happens was that the models were still working without modification, the template require only really small modifications to work and the controller part was not too hard to modify to get working on my now new framework (mostly updating request params usage, renaming methods and putting them in separate files). Then my app became bigger and bigger. Ramaze was doing the job right and easily. But I&#8217;ve quickly realized that I was missing some facilities from the Rails framework. Shame on me, I know enough of Rails to know that I miss some stuff. The webapp is still in a working prototype phase, but I&#8217;m not gonna polish it to make a release&#8230;</p>

<p>I&#8217;m not turning my back to Ramaze nor Sinatra. In fact, I&#8217;ve promised myself to use Sinatra the next time I need to create an API or a web service. And for sure Ramaze is a good choice for small website/webapp, because it&#8217;s way lighter that Rails, so it can be run on a shared web hosting more easily. I know that a VPS is cheap nowadays, but sometime you just want to try stuff on a cheaper Dreamhost account.</p>

<p>The thing is, I have a lot of free time these days, so I&#8217;m experimenting. My next project may not be in Ruby, even if I really like it. Because I&#8217;ve been seeing an ex lately&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://eleclerc.ca/2009/02/21/exploring-the-ruby-frameworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I&#8217;m playing with Ramaze</title>
		<link>http://eleclerc.ca/2009/01/16/why-im-playing-with-ramaze/</link>
		<comments>http://eleclerc.ca/2009/01/16/why-im-playing-with-ramaze/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 14:27:06 +0000</pubDate>
		<dc:creator>Eric Leclerc</dc:creator>
				<category><![CDATA[perso]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://danceric.net/?p=158</guid>
		<description><![CDATA[Why Ramaze instead or Rails or Merb? Because it&#8217;s a learning process, a Ruby learning process. I have build a website with Ruby on Rails, and I`ve thought: &#8220;Wow, this Ruby is a really nice language, let&#8217;s do something else with it.&#8221; Then I&#8217;ve realized how little I knew about the language, I knew rails,&#8230; <a href="http://eleclerc.ca/2009/01/16/why-im-playing-with-ramaze/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Why Ramaze instead or Rails or Merb? Because it&#8217;s a learning process, a Ruby learning process. I have build a website with Ruby on Rails, and I`ve thought: &#8220;Wow, this Ruby is a really nice language, let&#8217;s do something else with it.&#8221; Then I&#8217;ve realized how little I knew about the language, I knew rails, not Ruby.</p>

<p>So, being a web developer, I wanted to play with websites/web applications. Here&#8217;s where Ramaze come into play. Ramaze is not doing much for you, you have to know ruby to create something useful. In addition, Ramaze run well a Dreamhost account, where rails is slow in comparison (nothing against rails, but shared hosting is not the ideal solution for now).  Another plus, in the Ramaze source code, there&#8217;s an example folder, with a lot of good code to look at like a Blog, a Facebook app and a Wiki. It&#8217;s so cleanly written, it almost make me want to quit my day job&#8230; oh wait, I&#8217;ve just been laid off for economic reasons, yeah, more time for coding.</p>

<p>I know that <a href="http://github.com/manveru/ramaze/tree/master">Ramaze</a> won&#8217;t get me a new job, but It makes me smarter.</p>
]]></content:encoded>
			<wfw:commentRss>http://eleclerc.ca/2009/01/16/why-im-playing-with-ramaze/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ramaze with Passenger on Dreamhost</title>
		<link>http://eleclerc.ca/2008/09/23/ramaze-with-passenger-on-dreamhost/</link>
		<comments>http://eleclerc.ca/2008/09/23/ramaze-with-passenger-on-dreamhost/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 00:30:32 +0000</pubDate>
		<dc:creator>Eric Leclerc</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://danceric.net/?p=1</guid>
		<description><![CDATA[It&#8217;s easy to get Ramaze running on Dreamhost, as they are using Passenger. Here&#8217;s how: Enabling Passenger First log in to your Dreamhost control panel and go to you domain, you have to activate the option Ruby on Rails Passenger (mod_rails)? Then the setting for Specify your web directory: should point to the public folder&#8230; <a href="http://eleclerc.ca/2008/09/23/ramaze-with-passenger-on-dreamhost/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s easy to get Ramaze running on Dreamhost, as they are using Passenger. Here&#8217;s how:</p>

<h3>Enabling Passenger</h3>

<p>First log in to your Dreamhost control panel and go to you domain, you have to activate the option</p>

<pre><code>Ruby on Rails Passenger (mod_rails)?
</code></pre>

<p>Then the setting for</p>

<pre><code>Specify your web directory:
</code></pre>

<p>should point to the <em>public</em> folder in the directory where your ramaze application will live</p>

<h3>Install gems in you home directory</h3>

<p>Dreamhost does not provide the Ramaze gem, the easiest thing to do is to install your required gems in your home directory</p>

<p>First create a directory to hold the gems</p>

<pre><code>mkdir ~/.gems
</code></pre>

<p>Then update your environment</p>

<p>~/.bash_profile</p>

<pre><code>export GEM_HOME=$HOME/.gems
export GEM_PATH=$GEM_HOME:/usr/lib/ruby/gems/1.8
</code></pre>

<p>Then logout/login or execute this line to have your environment updated</p>

<pre><code>source ~/.bash_profile
</code></pre>

<p>Now you can install your own gems</p>

<pre><code>gem install ramaze --no-rdoc --no-ri
</code></pre>

<p>I’m using the flags to avoid generating the documentation, this is fairly process intensive and Dreamhost will probably kill you process. You should have your own development environment on your computer anyway if you need the doc</p>

<h3>Creating a Ramaze app</h3>

<p>I will not cover the creation of a Ramaze application, there is a lot of good tutorial already</p>

<h3>Hosting your Ramaze app on Dreamhost</h3>

<p>In the root of your application directory you need a rackup file for Passenger. ‘start’ being the bootstrap file for your application, this is needed as we need to update GEM<em>PATH to our own gems, this cannot be done in the config.ru file for some obscure reason</em></p>

<p><em>config.ru</em></p>

<pre><code>require 'start'

Ramaze.trait[:essentials].delete Ramaze::Adapter
Ramaze.start :force =&gt; true
run Ramaze::Adapter::Base
</code></pre>

<p>Now the important part, the <em>start.rb</em> file need to have information on your gems folder, right after the inclusion of rubygems</p>

<p><em>start.rb</em></p>

<pre><code>require 'rubygems'
#needed to avoid the Passenger exception page every hour or so
Gem.clear_paths
#use my own gem when availlable
Gem.path.unshift('/path/to/my/home/.gems')

require 'ramaze'

# require all controllers and models
acquire __DIR__/:controller/'*'
acquire __DIR__/:model/'*'
</code></pre>

<p>That’s all folk! By the way, it should work with Merb too.</p>
]]></content:encoded>
			<wfw:commentRss>http://eleclerc.ca/2008/09/23/ramaze-with-passenger-on-dreamhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

