<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	>
<channel>
	<title>Comments on: Bort - A Base Rails Application</title>
	<atom:link href="http://jimneath.org/2008/09/09/bort-base-rails-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://jimneath.org/2008/09/09/bort-base-rails-application/</link>
	<description>Ruby on Rails, Javascript, CSS and Standards</description>
	<pubDate>Tue, 06 Jan 2009 03:15:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bob Calco</title>
		<link>http://jimneath.org/2008/09/09/bort-base-rails-application/comment-page-1/#comment-812</link>
		<dc:creator>Bob Calco</dc:creator>
		<pubDate>Tue, 02 Dec 2008 02:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=59#comment-812</guid>
		<description>OK I figured out what my problem was. I'm using a non-standard database adapter on win32... Sam Smoot's mssqlclient. I have been massaging it to work on Rails 2.2 with some success but I occasionally find some odd stuff going on. In this case, it's prepending default strings with "N". In SQL Server you usually write something like N'somestring'. Apparently it's concatenating the N and the string. So for example, the 'name' attribute of user, which defaults to '', is "N". I can fix this. Changing the user.state to "passive" (instead of Npassive) and then calling user.register! an user.activate! did the trick.

- Bob</description>
		<content:encoded><![CDATA[<p>OK I figured out what my problem was. I&#8217;m using a non-standard database adapter on win32&#8230; Sam Smoot&#8217;s mssqlclient. I have been massaging it to work on Rails 2.2 with some success but I occasionally find some odd stuff going on. In this case, it&#8217;s prepending default strings with &#8220;N&#8221;. In SQL Server you usually write something like N&#8217;somestring&#8217;. Apparently it&#8217;s concatenating the N and the string. So for example, the &#8216;name&#8217; attribute of user, which defaults to &#8221;, is &#8220;N&#8221;. I can fix this. Changing the user.state to &#8220;passive&#8221; (instead of Npassive) and then calling user.register! an user.activate! did the trick.</p>
<p>- Bob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Calco</title>
		<link>http://jimneath.org/2008/09/09/bort-base-rails-application/comment-page-1/#comment-811</link>
		<dc:creator>Bob Calco</dc:creator>
		<pubDate>Tue, 02 Dec 2008 01:45:16 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=59#comment-811</guid>
		<description>I'm running into a problem during the migration when user.register! is called... deep in the bowels of aasm.rb, the call on line 118 to aasm_state_object_for_state(aasm_current_state) is returning nil, so rake db:migrate fails when it tries to call nil.call_action(:enter, self).

I took the creation of the admin role and initial admin user out of the migration (or rather, commented it out). After I successfully ran the migration without those steps, I manually reproduced them in the console.

I was able to create the admin role and the user, and add the admin role to the user. But calls to both user.register! and user.activate! yield the following error:

MethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.call_action
      from /vendor/gems/rubyist-aasm-2.0.2/lib/aasm.rb:118:in 'aasm_fire_event'
      from /vendor/gems/rubyist-aasm-2.0.2/lib/aasm.rb:56:in 'register!'
      from (irb):8

(substitute 'register!' with 'activate!' when I call user.activate! in above trace.)

I am running Rails 2.2.2, not 2.2.0.

- Bob</description>
		<content:encoded><![CDATA[<p>I&#8217;m running into a problem during the migration when user.register! is called&#8230; deep in the bowels of aasm.rb, the call on line 118 to aasm_state_object_for_state(aasm_current_state) is returning nil, so rake db:migrate fails when it tries to call nil.call_action(:enter, self).</p>
<p>I took the creation of the admin role and initial admin user out of the migration (or rather, commented it out). After I successfully ran the migration without those steps, I manually reproduced them in the console.</p>
<p>I was able to create the admin role and the user, and add the admin role to the user. But calls to both user.register! and user.activate! yield the following error:</p>
<p>MethodError: You have a nil object when you didn&#8217;t expect it!<br />
The error occurred while evaluating nil.call_action<br />
      from /vendor/gems/rubyist-aasm-2.0.2/lib/aasm.rb:118:in &#8216;aasm_fire_event&#8217;<br />
      from /vendor/gems/rubyist-aasm-2.0.2/lib/aasm.rb:56:in &#8216;register!&#8217;<br />
      from (irb):8</p>
<p>(substitute &#8216;register!&#8217; with &#8216;activate!&#8217; when I call user.activate! in above trace.)</p>
<p>I am running Rails 2.2.2, not 2.2.0.</p>
<p>- Bob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Neath</title>
		<link>http://jimneath.org/2008/09/09/bort-base-rails-application/comment-page-1/#comment-727</link>
		<dc:creator>Jim Neath</dc:creator>
		<pubDate>Sat, 08 Nov 2008 09:05:29 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=59#comment-727</guid>
		<description>Thanks Adam, I'll get that fix committed. :)</description>
		<content:encoded><![CDATA[<p>Thanks Adam, I&#8217;ll get that fix committed. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Salter</title>
		<link>http://jimneath.org/2008/09/09/bort-base-rails-application/comment-page-1/#comment-726</link>
		<dc:creator>Adam Salter</dc:creator>
		<pubDate>Sat, 08 Nov 2008 05:45:14 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=59#comment-726</guid>
		<description>I was able to fix the error `rake aborted! no such file to load — spec/rake/spectask` by changing line 7 of lib/tasks/rspec.task to:

rspec_base = File.expand_path(File.dirname(__FILE__) + '/../../vendor/gems/rspec-1.1.11/lib')</description>
		<content:encoded><![CDATA[<p>I was able to fix the error `rake aborted! no such file to load — spec/rake/spectask` by changing line 7 of lib/tasks/rspec.task to:</p>
<p>rspec_base = File.expand_path(File.dirname(__FILE__) + &#8216;/../../vendor/gems/rspec-1.1.11/lib&#8217;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Salter</title>
		<link>http://jimneath.org/2008/09/09/bort-base-rails-application/comment-page-1/#comment-725</link>
		<dc:creator>Adam Salter</dc:creator>
		<pubDate>Sat, 08 Nov 2008 05:32:30 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=59#comment-725</guid>
		<description>I'm getting the same error as Douglas above. OSX 10.5, Rails 2.2</description>
		<content:encoded><![CDATA[<p>I&#8217;m getting the same error as Douglas above. OSX 10.5, Rails 2.2</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Douglas</title>
		<link>http://jimneath.org/2008/09/09/bort-base-rails-application/comment-page-1/#comment-713</link>
		<dc:creator>Douglas</dc:creator>
		<pubDate>Thu, 06 Nov 2008 16:37:05 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=59#comment-713</guid>
		<description>When I run `rake db:migrate` I get the following error... 
`rake aborted!  no such file to load -- spec/rake/spectask`.  What gives?  I am on Windows XP, Rails 2.2.</description>
		<content:encoded><![CDATA[<p>When I run `rake db:migrate` I get the following error&#8230;<br />
`rake aborted!  no such file to load &#8212; spec/rake/spectask`.  What gives?  I am on Windows XP, Rails 2.2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Rhoades</title>
		<link>http://jimneath.org/2008/09/09/bort-base-rails-application/comment-page-1/#comment-704</link>
		<dc:creator>Philip Rhoades</dc:creator>
		<pubDate>Sat, 01 Nov 2008 01:31:13 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=59#comment-704</guid>
		<description>Don't worry - I worked this out . .

Thanks,

Phil.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t worry - I worked this out . .</p>
<p>Thanks,</p>
<p>Phil.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Rhoades</title>
		<link>http://jimneath.org/2008/09/09/bort-base-rails-application/comment-page-1/#comment-703</link>
		<dc:creator>Philip Rhoades</dc:creator>
		<pubDate>Sat, 01 Nov 2008 01:09:01 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=59#comment-703</guid>
		<description>srb,

Thanks - I did work that out eventually . .

Next question relating to authentication - for a library app (books, CDs, DVDs) I want to use the Rails dir:

    pricom.com.au/library

and I have started using Passenger (mod_rails) - I had to hard code "library" into paths in layout files so "authors", "books" etc can be found (eg /library/books) because RailsBaseURI  doesn't seem to work past the base name.  Anyway, activation emails are being sent out without the "library" eg with a URL of:

    http://pricom.com.au/activate/b4cd0. . . 

Where do I hard code "library" to fix the URL?

Thanks,

Phil.</description>
		<content:encoded><![CDATA[<p>srb,</p>
<p>Thanks - I did work that out eventually . .</p>
<p>Next question relating to authentication - for a library app (books, CDs, DVDs) I want to use the Rails dir:</p>
<p>    pricom.com.au/library</p>
<p>and I have started using Passenger (mod_rails) - I had to hard code &#8220;library&#8221; into paths in layout files so &#8220;authors&#8221;, &#8220;books&#8221; etc can be found (eg /library/books) because RailsBaseURI  doesn&#8217;t seem to work past the base name.  Anyway, activation emails are being sent out without the &#8220;library&#8221; eg with a URL of:</p>
<p>    <a href="http://pricom.com.au/activate/b4cd0" rel="nofollow">http://pricom.com.au/activate/b4cd0</a>. . . </p>
<p>Where do I hard code &#8220;library&#8221; to fix the URL?</p>
<p>Thanks,</p>
<p>Phil.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: srb</title>
		<link>http://jimneath.org/2008/09/09/bort-base-rails-application/comment-page-1/#comment-692</link>
		<dc:creator>srb</dc:creator>
		<pubDate>Fri, 24 Oct 2008 12:48:02 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=59#comment-692</guid>
		<description>Phillip,

Why are you copying this line?
skip_before_filter :verify_authenticity_token, :only =&#62; :create

You probably want this instead:
before_filter :login_required</description>
		<content:encoded><![CDATA[<p>Phillip,</p>
<p>Why are you copying this line?<br />
skip_before_filter :verify_authenticity_token, :only =&gt; :create</p>
<p>You probably want this instead:<br />
before_filter :login_required</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://jimneath.org/2008/09/09/bort-base-rails-application/comment-page-1/#comment-689</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Wed, 22 Oct 2008 16:16:16 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=59#comment-689</guid>
		<description>Bort is really handy, but I feel that with the introduction of open ID support you may have gone a little too far in one direction.  None of my projects ever use open id, for a variety of reasons.  Hopefully you won't get caught up in adding too many more features at the base, as the last thing a cool time-saving project like this needs is feature bloat.  Either way, thanks for making this!</description>
		<content:encoded><![CDATA[<p>Bort is really handy, but I feel that with the introduction of open ID support you may have gone a little too far in one direction.  None of my projects ever use open id, for a variety of reasons.  Hopefully you won&#8217;t get caught up in adding too many more features at the base, as the last thing a cool time-saving project like this needs is feature bloat.  Either way, thanks for making this!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
