* You are viewing the archive for the ‘Ruby’ Category

Error with fsevent and autospec (on Mac)

Today I’ve upgraded my gems and noticed that when running my autospec I get an odd error:
[01:09:25 /usr/local/lib/ruby/gems/1.8/gems/ruby-ole-1.2.10/lib/ole/storage/base.rb:146:load]

WARN   root name was “R”
And my autospec would keep printing out:

sh: line 1:  6303 Trace/BPT trap          /usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.1.2/fsevent/darwin/fsevent_sleep ‘/Users/andrew/rails_apps/example_com’ 2>&1
sh: line 1:  6307 Trace/BPT trap          /usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.1.2/fsevent/darwin/fsevent_sleep ‘/Users/andrew/rails_apps/example_com’ 2>&1
Unfortunately I don’t have the time to look into the fsevent code to see if I can make a work around, however I found that you can remove the gem (’sudo gem uninstall autotest-fsevent’) and install the older version (’sudo gem install autotest-fsevent –version 0.1.1′)

Hopefully this helps someone … Continue Reading

Rails 2.3 Templates on Windows

In Rails 2.3, templates are simple ruby files containing DSL for adding plugins, gems, initializers, etc. to your freshly created Rails project. To apply the template, you need to provide the rails generator with location of the template you wish to apply, using -m option.

Reading up on the commands in the template system and watching the railscasts.com episode, I got fired up on the possibilities of such a simple yet amazing system. So I dove in and started creating my base template. I was so excited that I write the whole template out in one go and … Continue Reading

Installing/Updating SQLite3 on Windows

Installing SQLite3 DLL

To install SQLite3 in windows you require not only the gem but a DLL files in your system PATH (or in your windows/system32 folder).

To obtain the DLL, go to: http://www.sqlite.org/download.html

I always believe that DLLs belong in the windows/system32 folder but as long as you put yours somewhere where your PATH environment variable points to, you should be fine.

Installing/Updating the SQLite3 Gem

Normally to install the gem you’d call gem install sqlite3-ruby and it would do everything automatically but if you try it (as of today) it will give … Continue Reading