To speed up site loading, there are two great plugins for “compressing” your stylesheets and javascript.
The first is bundle-fu. This plugin does not actually compress the files, but rather combines all of the individual documents into one before shipping it out to the client browser.
$ script/plugin install git://github.com/timcharper/bundle-fu.git
And then you simply wrap your sheet and script calls in the bundle method:
<% bundle do %>
...
<%= javascript_include_tag "prototype" %>
<%= stylesheet_link_tag "basic.css" %>
<%= calendar_date_select_includes "red" %>
...
<% end %>
The Second plugin, which actually does compress all of your files, is sbecker’s asset_packager. This one is a lot more involved, so check out the github site for more information.
I use the Shoulda testing framework for my Rails applications. After installing and beginning to use the Ultrasphinx plugin, I needed to figure out how to configure and run in a testing environment. This blog entry held the answer: Stephen Celis: Testing with Ultrasphinx
After installing all of the necessary elements for Spinx and Ultrasphinx, I began following the instructions from Snax Fauna to get the system up and running.
rake ultrasphinx:configure
worked fine, but I encountered the following error upon attempting to index my models:
rake ultrasphinx:index
...
dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
Referenced from: /usr/local/bin/indexer
Reason: image not found
In my configuration for development, I use the MAMP MySql server. The rake configure command correctly pulled all of the connection information from database.yml, so that was not the problem.
I searched around and finally encountered this solution from Michael Hartl:
$ sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
It worked brilliantly. Thanks Michael.