A friend who has recently been getting into Rails has had issues getting the MySQL gem installed on Windows. He was asking me about it and I figured why not create a screencast that might help others too.
I recently upgraded to Lion and wanted to have a script run on startup. I googled this and got back things like launchd and login hooks… Tried a couple of them to no avail. Then I thought I might try creating an /etc/rc.local. Sure enough, it worked.
For those of you not familiar, the commands you enter in rc.local are the last to get run after all the other services start up… Simply create your /etc/rc.local as follows:
# enter commands / paths to scripts here
Posted in Uncategorized
Tagged Lion, OSX
Installing Rails 3.1 today I came across this error while installing the therubyracer gem:
g++ -shared -o v8.so v8_locker.o v8_exception.o v8_date.o v8_try_catch.o v8_debug.o v8_v8.o v8_value.o v8_context.o v8.o v8_message.o v8_array.o v8_handle.o v8_object.o v8_weakref.o v8_string.o v8_script.o v8_external.o v8_function.o v8_callbacks.o rr.o v8_template.o -L/usr/local/rvm/gems/ruby-1.9.2-p180@droo/gems/libv8-184.108.40.206/lib/libv8/build/v8 -Wl,-R/usr/local/rvm/gems/ruby-1.9.2-p180@droo/gems/libv8-220.127.116.11/lib/libv8/build/v8 -L. -L/usr/local/rvm/rubies/ruby-1.9.2-p180/lib -Wl,-R/usr/local/rvm/rubies/ruby-1.9.2-p180/lib -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/usr/local/rvm/rubies/ruby-1.9.2-p180/lib -L/usr/local/rvm/rubies/ruby-1.9.2-p180/lib -lruby -lpthread -lpthread -lrt -ldl -lcrypt -lm -lc -lv8
<code>/usr/bin/ld: cannot find -lv8</code>
collect2: ld returned 1 exit status
make: *** [v8.so] Error 1
Most of us use some sort of Windows variant for our desktops. And even for those of us that are Rails developers, I suspect we likely are using Windows as well on the desktop when not using our macbooks. Over the years, I’ve tried a number of different options but I feel like I’ve finally gotten to a fairly comfortable Rails development environment on Windows. I’m currently running Windows 7 on my desktop and use VirtualBox to run Fedora. Then through Samba, I mount a share that I then use Sublime Text 2 (on Windows) as my text editor.
These instructions will cover, step-by-step, how to install VirtualBox, Fedora 14 with Rails 3/MySQL and Apache (via mod_passenger).
Download and install VirtualBox
- Download VirtualBox from here: http://www.virtualbox.org/wiki/Downloads. As of this post, version 4.0.8 is the latest available.
- Once downloaded, double-click VirtualBox-4.0.8-71778-Win.exe to get the setup wizard started. Click ‘Next’.
- Unless you want to make some customizations to the install, simply click ‘Next’ to go with the defaults.
- Click ‘Next’.
- Click ‘Yes’.
- Click ‘Install’.
- Click ‘Install’.
- Click ‘Finish’. Note to be sure to accept anything, if prompted, to complete the install.
Creating the Fedora VM
- With VirtualBox installed and started, we now move on to creating the Virtual Machine or VM. Click on ‘New’ and you should see the New Virtual Machine Wizard start up. Click ‘Next’.
- Enter the name of the VM you wish to create. Note, when I entered Fedora 14, the installer recognized which operating system and version to select. Click ‘Next’.
- Allocate memory to your VM. Don’t select an amount beyond the green indicator for available memory. Click ‘Next’.
- Create new disk, click ‘Next’.
- Click ‘Next’.
- To keep the disk size only as large as we need it, choose ‘Dynamically expanding storage’. Click ‘Next’.
- Choose the disk location and size. Click ‘Next’.
- Click ‘Finish’ to create the new Virtual Disk.
- Click ‘Finish’ to create the new Virtual Machine.
That brings us to the end of Part 1. Part 2 we’ll be installing Fedora 14.
Sublime Text 2 is a text editor worth checking out. One thing missing for me though was support for Cucumber features. Today I found it!
I think it’s time to buy a license.
Just the other day, I installed Snow Leopard and now, re-installing my development environment I came across this when trying to install Nokogiri.
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
libiconv is missing. please visit
http://nokogiri.org/tutorials/installing_nokogiri.html for help with
I spent a bunch of time trying different options on with the ‘gem install’ and then actually decided to follow the instructions on the Nokogiri site. Even though it looks like an iconv problem (and maybe it is) running the following updates not only libxml2 and libxslt but iconv as well:
sudo port install libxml2 libxslt
gem install nokogiri # in my case I was using RVM
Sure enough, the install worked.
As far as us kids were concerned, the F-16 didn't quite match the aesthetics of the F-14 and based on this plastic toy, we figured it sucked
I recently came across this old toy of mine in my Grandma’s basement. It was just some cheap thing from K-Mart and really, the only reason it survived was because I thought it was piece of junk and didn’t play with it. Seeing it though makes me laugh — reminds me of my cousin flying around the house with it singing (to the theme of Top Gun), “The F-sixteeeeeen really sucks, da-da-daa, da-da-daa, da-da-daa-daa…”
In contrast, I also recall my uncle trying to convince me of the F-16′s merits.