<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-810844927799607513</id><updated>2012-02-13T08:39:25.799-08:00</updated><title type='text'>Not a Ninja</title><subtitle type='html'>Ramblings on Ruby, Rails, and other crap by a non-Rockstar</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://crafted-code.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://crafted-code.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jamey Cribbs</name><uri>https://profiles.google.com/109743779397992790704</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-Hb0XpxcJJxk/AAAAAAAAAAI/AAAAAAAAADM/XWINtb4sq04/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-810844927799607513.post-1114222687600523025</id><published>2012-02-13T08:39:00.000-08:00</published><updated>2012-02-13T08:39:11.867-08:00</updated><title type='text'>Setting rvm gemset in vim</title><content type='html'>I was having a problem setting my rvm gemset manually in vim using vim-rvm. &amp;nbsp;I would do a "Rvm gemset use rails234", but then doing a "Rvm info" showed that the gemset was not set.&lt;br /&gt;&lt;br /&gt;I finally figured out that if I set the ruby version and the gemset all at once, it would stick, as in "Rvm 1.8.7-oldgem@rails234".&lt;br /&gt;&lt;br /&gt;If you have to set your rvm stuff manually in vim and you run into the same problem, hopefully this will help.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/810844927799607513-1114222687600523025?l=crafted-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crafted-code.blogspot.com/feeds/1114222687600523025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=810844927799607513&amp;postID=1114222687600523025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/1114222687600523025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/1114222687600523025'/><link rel='alternate' type='text/html' href='http://crafted-code.blogspot.com/2012/02/setting-rvm-gemset-in-vim.html' title='Setting rvm gemset in vim'/><author><name>Jamey Cribbs</name><uri>https://profiles.google.com/109743779397992790704</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-Hb0XpxcJJxk/AAAAAAAAAAI/AAAAAAAAADM/XWINtb4sq04/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-810844927799607513.post-4601510319645005580</id><published>2011-02-22T13:06:00.000-08:00</published><updated>2011-02-22T13:09:23.524-08:00</updated><title type='text'>Rails 3 Upgrade Gotchas</title><content type='html'>We are in the process of upgrading a very large Rails 2 app to Rails 3.  I decided that this would be an excellent time to actually update this blog!  So, I'm going to try to post a quick blurb every time I run into a gotcha that bites me.  Here is the first one:&lt;br /&gt;&lt;br /&gt;Switching to the mysql2 gem to use with Rails 3, got it included in your gemfile, still won't work?&lt;br /&gt;&lt;br /&gt;Make sure you change your adapter: settings in your database.yml to "mysql2".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/810844927799607513-4601510319645005580?l=crafted-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crafted-code.blogspot.com/feeds/4601510319645005580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=810844927799607513&amp;postID=4601510319645005580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/4601510319645005580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/4601510319645005580'/><link rel='alternate' type='text/html' href='http://crafted-code.blogspot.com/2011/02/rails-3-upgrade-gotchas.html' title='Rails 3 Upgrade Gotchas'/><author><name>Jamey Cribbs</name><uri>https://profiles.google.com/109743779397992790704</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-Hb0XpxcJJxk/AAAAAAAAAAI/AAAAAAAAADM/XWINtb4sq04/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-810844927799607513.post-6329611106171886633</id><published>2009-06-04T09:35:00.001-07:00</published><updated>2009-06-04T09:39:27.294-07:00</updated><title type='text'>Deploying from RubyMine</title><content type='html'>I'm really enjoying RubyMine.  I like the git integration.  It's nice to not have to open up a terminal just to commit/push changes.&lt;br /&gt;&lt;br /&gt;Currently, there is not similar built in support for Capistrano, but it's easy enough to fake.  Just go to Run/Run and add a new entry with the following parameters:&lt;br /&gt;&lt;br /&gt;Ruby Script:  /usr/bin/cap&lt;br /&gt;Script Arguments:  deploy  (if you do multi-stage, you can do "production deploy", etc.)&lt;br /&gt;Working Directory:  local RAILS_ROOT dir&lt;br /&gt;&lt;br /&gt;Leave everything else as default and you are good to go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/810844927799607513-6329611106171886633?l=crafted-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crafted-code.blogspot.com/feeds/6329611106171886633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=810844927799607513&amp;postID=6329611106171886633' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/6329611106171886633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/6329611106171886633'/><link rel='alternate' type='text/html' href='http://crafted-code.blogspot.com/2009/06/deploying-from-rubymine.html' title='Deploying from RubyMine'/><author><name>Jamey Cribbs</name><uri>https://profiles.google.com/109743779397992790704</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-Hb0XpxcJJxk/AAAAAAAAAAI/AAAAAAAAADM/XWINtb4sq04/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-810844927799607513.post-4872816334851799265</id><published>2008-04-16T11:00:00.000-07:00</published><updated>2008-04-16T11:13:36.125-07:00</updated><title type='text'>Getting Radiant and Exception Notifier to play nice together</title><content type='html'>I recently had a need to install the &lt;a href="http://svn.rubyonrails.org/rails/plugins/exception_notification/"&gt;Exception Notifier&lt;/a&gt; plugin in Radiant.  I used &lt;a href="http://casperfabricius.com/blog/2007/08/19/three-rails-plugins/"&gt;this&lt;/a&gt; excellent post from Casper Fabricus to get it working with Radiant, but I wanted to have it included in every controller, even the Radiant ones, not just the ones in our various extensions.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since Radiant is a gem, you don't have direct access to it's application controller to be able to add the includes.  It took me a little while to figure this out, but I finally hit on adding these lines to the bottom of the library file that Casper creates in his article:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;class ActionController::Base&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;  include ExceptionNotifiable&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;  alias :rescue_action_locally :rescue_action_in_public&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This causes Exception Notifier to be available for all controllers, even Radiants'.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/810844927799607513-4872816334851799265?l=crafted-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crafted-code.blogspot.com/feeds/4872816334851799265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=810844927799607513&amp;postID=4872816334851799265' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/4872816334851799265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/4872816334851799265'/><link rel='alternate' type='text/html' href='http://crafted-code.blogspot.com/2008/04/getting-radiant-and-exception-notifier.html' title='Getting Radiant and Exception Notifier to play nice together'/><author><name>Jamey Cribbs</name><uri>https://profiles.google.com/109743779397992790704</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-Hb0XpxcJJxk/AAAAAAAAAAI/AAAAAAAAADM/XWINtb4sq04/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-810844927799607513.post-9080811009307265447</id><published>2008-01-29T07:35:00.000-08:00</published><updated>2008-04-16T11:15:12.961-07:00</updated><title type='text'>Enough with the ninjas!</title><content type='html'>Hey Rails community.  Can you stop using the term "ninja"?  The first four million times it was used in job posts, About Us links, and blog articles were hilarious and felt fresh as a baby's bottom.  But now, its starting to get a little old.&lt;br /&gt;&lt;br /&gt;I think that before someone is allowed to use this word, they have to fulfill the following requirements:&lt;br /&gt;&lt;br /&gt;1.  Wear black pajamas in public for an entire year.&lt;br /&gt;2.  Assassinate a head-of-state.&lt;br /&gt;3.  Code an entire Rails app while holding a pair of nunchucks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/810844927799607513-9080811009307265447?l=crafted-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crafted-code.blogspot.com/feeds/9080811009307265447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=810844927799607513&amp;postID=9080811009307265447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/9080811009307265447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/9080811009307265447'/><link rel='alternate' type='text/html' href='http://crafted-code.blogspot.com/2008/01/enough-with-fucking-ninjas.html' title='Enough with the ninjas!'/><author><name>Jamey Cribbs</name><uri>https://profiles.google.com/109743779397992790704</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-Hb0XpxcJJxk/AAAAAAAAAAI/AAAAAAAAADM/XWINtb4sq04/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-810844927799607513.post-5135181502087636959</id><published>2007-12-28T08:52:00.000-08:00</published><updated>2007-12-28T09:03:46.501-08:00</updated><title type='text'>Temporarily Turning Off Acts_As_Solr</title><content type='html'>In a current project, I need to run a rake task that populates a Person table with data from Active Directory.  The Person table uses acts_as_solr.&lt;br /&gt;&lt;br /&gt;The problem is that the Net:LDAP gem and acts_as_solr seem to conflict with each other.  When I define acts_as_solr in the Person table, I get a bind error in Net:LDAP.  I have tried changing port numbers for acts_as_solr, but no go.&lt;br /&gt;&lt;br /&gt;So, here's a work around that might be helpful to others.  What I want is the ability to temporarily turn off acts_as_solr in the Person model, run the rake task to populate the table, then turn acts_as_solr back on.&lt;br /&gt;&lt;br /&gt;First, in the Person model here is how include acts_as_solr:&lt;br /&gt;&lt;br /&gt;      acts_as_solr if AppConfig.solr_on&lt;br /&gt;&lt;br /&gt;So, acts_as_solr will only be included if a global variable called solr_on is true.&lt;br /&gt;&lt;br /&gt;Now, in the rake task, I first set solr_on to false:&lt;br /&gt;&lt;br /&gt;      AppConfig.solr_on = false&lt;br /&gt;&lt;br /&gt;Then, I re-load the Person class, so that acts_as_solr will not be included:&lt;br /&gt;&lt;br /&gt;      load "#{RAILS_ROOT}/app/models/person.rb"&lt;br /&gt;&lt;br /&gt;Finally, at the bottom of the rake task, I set solr_on back to true and re-load the Person class, so that acts_as_solr will be included.  I also reindex solr so that the added records will be included:&lt;br /&gt;&lt;br /&gt;        AppConfig.solr_on = true&lt;br /&gt;        load "#{RAILS_ROOT}/app/models/person.rb"&lt;br /&gt;        Person.rebuild_solr_index&lt;br /&gt;&lt;br /&gt;This might be beneficial in a more generic context.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/810844927799607513-5135181502087636959?l=crafted-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crafted-code.blogspot.com/feeds/5135181502087636959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=810844927799607513&amp;postID=5135181502087636959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/5135181502087636959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/5135181502087636959'/><link rel='alternate' type='text/html' href='http://crafted-code.blogspot.com/2007/12/temporarily-turning-off-actsassolr.html' title='Temporarily Turning Off Acts_As_Solr'/><author><name>Jamey Cribbs</name><uri>https://profiles.google.com/109743779397992790704</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-Hb0XpxcJJxk/AAAAAAAAAAI/AAAAAAAAADM/XWINtb4sq04/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-810844927799607513.post-7346231790146915627</id><published>2007-12-21T13:11:00.000-08:00</published><updated>2007-12-21T13:15:35.306-08:00</updated><title type='text'>Mac Ports upgrade of ruby breaks dbi/odbc</title><content type='html'>In case anyone else runs into this hair-puller-outer:&lt;br /&gt;&lt;br /&gt;I upgraded the Mac Ports version of ruby on my Macbook and suddenly my rake tasks that use dbi/odbc were bombing saying ruby couldn't find the ODBC driver for dbi.  I made sure my rb-dbi and rb-odbc were the latest ports, but no go.  Finally, I uninstalled rb-odbc and reinstalled rb-odbc, same version, and things started working again.  Go figure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/810844927799607513-7346231790146915627?l=crafted-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crafted-code.blogspot.com/feeds/7346231790146915627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=810844927799607513&amp;postID=7346231790146915627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/7346231790146915627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/810844927799607513/posts/default/7346231790146915627'/><link rel='alternate' type='text/html' href='http://crafted-code.blogspot.com/2007/12/mac-ports-upgrade-of-ruby-breaks.html' title='Mac Ports upgrade of ruby breaks dbi/odbc'/><author><name>Jamey Cribbs</name><uri>https://profiles.google.com/109743779397992790704</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-Hb0XpxcJJxk/AAAAAAAAAAI/AAAAAAAAADM/XWINtb4sq04/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
