In my last tech tip I talked about a problem connecting the late 2008 MacBook to a VGA projector and that you need to buy a direct Mini DisplayPort to VGA adapter.
It turns out that this adapter has a problem of its own in that it can cause flickering with certain displays - not what you want to find out when are starting a presentation to a client. Apple has issued a fix for this that updates the firmware in the adapter. Who knew that adapters had firmware? I just assumed it was just wires crossing over in the right way!?
But there's a problem... actually several...
1: The update is not included in the regular Apple Software Update process unless you use that adapter and a live monitor as your main machine. If you use a DVI monitor like me then you'll never know about it unless you read an article like this. Fail.
2: The instructions for installing the fix require that you not only have the adapter plugged into your Mac but you have to have a live VGA monitor plugged into it. What are you supposed to do if you don't have one? Ask you client if they wouldn't mind waiting a few minutes while you plug into their projector and do a firmware update? Double Fail.
3: Those instructions raise the possibility that your VGA monitor may not work with this adapter. Again, I'm only going to find this out in a conference room at one of my clients. Fail.
I'm sure there are important technical reasons for all this but this not what I expect from Apple. It's an adapter - it should just work.
A collection of computer systems and programming tips that you may find useful.
Brought to you by Craic Computing LLC, a bioinformatics consulting company.
Thursday, March 19, 2009
Saturday, February 28, 2009
DVI connector problem with 2008 Mac PowerBook and Video Projectors
I've got a 2008 metal Apple MacBook which has the new mini DisplayPort that allows you to connect an external monitor. Apple provide a mini-DisplayPort to DVI adapter and I use that all the time with my Viewsonic external monitor ... not a problem.
Last week I wanted to show a client some work I had done for them and so took the Mac, the mini-DisplayPort adapter and a DVI to VGA adapter with me. BIG PROBLEM... I needed the DVI-VGA adapter to connect to the client's projector. But when I tried to plug the Apple DVI-VGA adapter into the Apple DVI-DisplayPort adapter it wouldn't fit.
The DVI-VGA adapter has four extra pins on either side of the flat blade of the DVI plug. The DVI-DisplayPort adapter has no matching holes!!! What the!?!
It turns out there are more than one DVI connector. The new DVI-DisplayPort used the DVI-D connector - 'DVI Digital', also called True Digitial. The other adapter uses DVI-I - 'DVI Integrated Digital and Analog (and specifically the Single Link version thereof). You can plug DVI-D or DVI-I onto a DVI-I socket ... but not the other way round...
You get more of the gory details here: http://www.directron.com/dviguide.html - scroll down for images of the connectors.
So if you want to use your MacBook with a VGA projector, you need to get a suitable adapter.
You might want to go with a direct miniDisplayPort to VGA. Apple sell one for $29 (Mini DisplayPort to VGA Adapter) This will do the job but it is really overpriced considering what it is.
You could also get a DVI-D to VGA adapter. Apple have one of those but they don't say if it is DVI-D or DVI-I! What use is that? Your best bet is to look on Amazon and be specific about DVI-D. You want Male DVI-D and Female VGA. There are plenty of options.
One last thing - don't confuse mini DVI with mini DisplayPort - two different things!
In my meeting I was lucky - it wan an informal meeting and I was able to copy my files to a Win PC that connected to the projector. But if that had been an important presentation I would have looked like a fool... not good. Get an adapter TODAY.
Last week I wanted to show a client some work I had done for them and so took the Mac, the mini-DisplayPort adapter and a DVI to VGA adapter with me. BIG PROBLEM... I needed the DVI-VGA adapter to connect to the client's projector. But when I tried to plug the Apple DVI-VGA adapter into the Apple DVI-DisplayPort adapter it wouldn't fit.
The DVI-VGA adapter has four extra pins on either side of the flat blade of the DVI plug. The DVI-DisplayPort adapter has no matching holes!!! What the!?!
It turns out there are more than one DVI connector. The new DVI-DisplayPort used the DVI-D connector - 'DVI Digital', also called True Digitial. The other adapter uses DVI-I - 'DVI Integrated Digital and Analog (and specifically the Single Link version thereof). You can plug DVI-D or DVI-I onto a DVI-I socket ... but not the other way round...
You get more of the gory details here: http://www.directron.com/dviguide.html - scroll down for images of the connectors.
So if you want to use your MacBook with a VGA projector, you need to get a suitable adapter.
You might want to go with a direct miniDisplayPort to VGA. Apple sell one for $29 (Mini DisplayPort to VGA Adapter) This will do the job but it is really overpriced considering what it is.
You could also get a DVI-D to VGA adapter. Apple have one of those but they don't say if it is DVI-D or DVI-I! What use is that? Your best bet is to look on Amazon and be specific about DVI-D. You want Male DVI-D and Female VGA. There are plenty of options.
One last thing - don't confuse mini DVI with mini DisplayPort - two different things!
In my meeting I was lucky - it wan an informal meeting and I was able to copy my files to a Win PC that connected to the projector. But if that had been an important presentation I would have looked like a fool... not good. Get an adapter TODAY.
Sunday, February 22, 2009
A Rails, Ajax and RJS issue - seeing JavaScript in your HTML
Here's an example of the dangers of following tutorials too closely...
I want to use Ajax on a web page to monitor the completion of a job running on a remote server. For the purposes of this tip, all I want to do is change the text 'Running' to 'Completed'.
The div I want to update is called 'check_status_div' and starts out as:
Below it I have this block based on text in the Rails book:
This ought to call the 'check_status' action in the controller, every 5 seconds and update the div 'check_status_div' until that div no longer contains the content 'Running'
In the Controller I have this:
This get the specified Job object, calls a method in the Model to determine if it is complete and, if so, replace the contents of the 'check_status_div' with the string 'Completed'.
To get this to work I also needed to add a custom route to routes.rb. Note that this is a POST.
That should work... but I get this:
That's not right...
The problem turns out to be that I am duplicating the ID of the DIV to be updated, first in the 'periodically_call_remote' call in the view, and again in the controller. Leave the controller and remove this line from the Ajax call in the View:
It works... I'm not quite sure why. All the 'try' verbage is the JavaScript returned from the server and with that 'update' clause in the ajax call this is not getting evaluated.
Hope that helps.
I want to use Ajax on a web page to monitor the completion of a job running on a remote server. For the purposes of this tip, all I want to do is change the text 'Running' to 'Completed'.
The div I want to update is called 'check_status_div' and starts out as:
<div id="check_status_div">Running</div>
Below it I have this block based on text in the Rails book:
<%= periodically_call_remote :url => { :action => 'check_status', :id => @job.id },
:update => 'check_status_div'
:frequency => 5,
:condition => "$('check_status_div').innerHTML == 'Running'"
%>This ought to call the 'check_status' action in the controller, every 5 seconds and update the div 'check_status_div' until that div no longer contains the content 'Running'
In the Controller I have this:
def check_status
@job = Job.find(params[:id])
if @job.completed?
render :update do |page|
page.replace_html 'check_status_div', "Completed"
end
end
end
This get the specified Job object, calls a method in the Model to determine if it is complete and, if so, replace the contents of the 'check_status_div' with the string 'Completed'.
To get this to work I also needed to add a custom route to routes.rb. Note that this is a POST.
map.resources :jobs, :member => { :check_status => :post }That should work... but I get this:
try { Element.update("check_status_div", "Completed"); }
catch (e) { alert('RJS error:\n\n' + e.toString());
alert('Element.update(\"check_status_div\", \"Completed\");'); throw e }That's not right...
The problem turns out to be that I am duplicating the ID of the DIV to be updated, first in the 'periodically_call_remote' call in the view, and again in the controller. Leave the controller and remove this line from the Ajax call in the View:
:update => 'check_status_div'
It works... I'm not quite sure why. All the 'try' verbage is the JavaScript returned from the server and with that 'update' clause in the ajax call this is not getting evaluated.
Hope that helps.
Sunday, February 15, 2009
Switching an Email Server to Google Apps
I've been running my own email server on a machine on my network for years. It's been fine but I've never had a good handle on spam (and when your email address is jones then you get a lot of it!), when my DSL goes down so does my access to email and it's just one more thing to look after. Plus recently Hotmail and Yahoo have started treating email from servers behind DSL connections as spam... great...
So I've moved my email over to Google Apps. You can set up an individual account, of course, or you can sign up for their 'Premier' Edition at $50/user/year (which is not bad) or you can use their 'Standard' Edition for free with up to 50 users (and some ads). I went with the latter - here is how you do it:
Assumptions:
1: You have an existing domain name
2: You have an existing and operational mail server
3: You access that mail server from Thunderbird, etc, via IMAP
Note that Google does not promote the Standard Edition - but it is there and open to new subscribers. Go to this signup page.
There are three stages:
1: You set up the server on Google Apps and demonstrate that you own the domain
2: You change the DNS records so that your email gets sent to it.
3: You change you mail readers to access the mail on Google
I'm not going to go into all the details as Google's help pages are pretty good. but there are a few things to bear in mind and one really important thing.
Part 1
You can go ahead and set up the Google Apps account without messing with your existing email, at least to begin with. You need to demonstrate that you are the owner of the domain and they give you two ways to do that.
If you have a web server on this domain then you can create a web page called googlehostedservice.html which will include nothing more than a string that they provide - something like google5caf2f0c6ff7e39 - yours will be different. You place that on your site and Google will look for it and verify your control of the domain. This might take a little while - minutes, not hours.
You then need to create accounts for each user that the server will handle mail for. Note that they do not support regular email aliases, which was an issue for me. But you can create accounts for each alias and then forward email to another account. I haven't figured out all the options with it yet.
They give you a test email address that allows you to test things are working before you actually switch the DNS records.
Part 2
Now you switch the DNS records...
STOP RIGHT THERE !
Once you do this all your prior email on your server will NOT be available to you. It will still be there but unless you want to use an alternate domain name, you will not be able to access it via IMAP.
So right before you change DNS records you want to go into Thunderbird, or whatever, and select your entire Inbox (and other folders) and copy their contents to one more more Local Folders. This can take a while with large Inboxes.
I did not realize this until too late. I recovered by using an alternate domain name and pointing that to the old server, but if not for that I would have had to reset the DNS to the old server, get the existing mail and then redo the DNS changes.
OK... you've got your existing email stashed away. Now change the DNS MX records as directed by the Google instructions. It can take some time for those changes to propogate and until they do, new incoming emails will still be sent to the old server and so may not be accessible to you. So make the changes when things are fairly quiet.
On a Unix system you can see what the records point to with the command 'dig yourdomain.com mx'
Unless you want to use other Google Aps services, do not change other DNS records - only the MX records.
Part 3
At this point your email will be going to your account on Google. Login to the URL they gave you - something like https://mail.google.com/a/yourdomain.com/ - and try sending/receiving email. It should just work. If not then check those DNS records again and/or wait a while for them to propogate everywhere.
If the web interface to your email is working then reconfigure your email client to access the Google hosted server. Look at their instructions and follow them carefully. You need to change the incoming and outgoing server names to ones at Google and importantly you will need to change the ports that they use as these are not the defaults.
Overall, the change has worked well for me. Google is doing a good job handling spam, I can access the mail from anywhere, I can avoid the ads by using Thunderbird, and I can give up running my own server. It's a win all around. At some point I may upgrade to their premier edition but I don't see a real need to do that right now.
One less thing to worry about... and no, I don't worry about Google...
So I've moved my email over to Google Apps. You can set up an individual account, of course, or you can sign up for their 'Premier' Edition at $50/user/year (which is not bad) or you can use their 'Standard' Edition for free with up to 50 users (and some ads). I went with the latter - here is how you do it:
Assumptions:
1: You have an existing domain name
2: You have an existing and operational mail server
3: You access that mail server from Thunderbird, etc, via IMAP
Note that Google does not promote the Standard Edition - but it is there and open to new subscribers. Go to this signup page.
There are three stages:
1: You set up the server on Google Apps and demonstrate that you own the domain
2: You change the DNS records so that your email gets sent to it.
3: You change you mail readers to access the mail on Google
I'm not going to go into all the details as Google's help pages are pretty good. but there are a few things to bear in mind and one really important thing.
Part 1
You can go ahead and set up the Google Apps account without messing with your existing email, at least to begin with. You need to demonstrate that you are the owner of the domain and they give you two ways to do that.
If you have a web server on this domain then you can create a web page called googlehostedservice.html which will include nothing more than a string that they provide - something like google5caf2f0c6ff7e39 - yours will be different. You place that on your site and Google will look for it and verify your control of the domain. This might take a little while - minutes, not hours.
You then need to create accounts for each user that the server will handle mail for. Note that they do not support regular email aliases, which was an issue for me. But you can create accounts for each alias and then forward email to another account. I haven't figured out all the options with it yet.
They give you a test email address that allows you to test things are working before you actually switch the DNS records.
Part 2
Now you switch the DNS records...
STOP RIGHT THERE !
Once you do this all your prior email on your server will NOT be available to you. It will still be there but unless you want to use an alternate domain name, you will not be able to access it via IMAP.
So right before you change DNS records you want to go into Thunderbird, or whatever, and select your entire Inbox (and other folders) and copy their contents to one more more Local Folders. This can take a while with large Inboxes.
I did not realize this until too late. I recovered by using an alternate domain name and pointing that to the old server, but if not for that I would have had to reset the DNS to the old server, get the existing mail and then redo the DNS changes.
OK... you've got your existing email stashed away. Now change the DNS MX records as directed by the Google instructions. It can take some time for those changes to propogate and until they do, new incoming emails will still be sent to the old server and so may not be accessible to you. So make the changes when things are fairly quiet.
On a Unix system you can see what the records point to with the command 'dig yourdomain.com mx'
Unless you want to use other Google Aps services, do not change other DNS records - only the MX records.
Part 3
At this point your email will be going to your account on Google. Login to the URL they gave you - something like https://mail.google.com/a/yourdomain.com/ - and try sending/receiving email. It should just work. If not then check those DNS records again and/or wait a while for them to propogate everywhere.
If the web interface to your email is working then reconfigure your email client to access the Google hosted server. Look at their instructions and follow them carefully. You need to change the incoming and outgoing server names to ones at Google and importantly you will need to change the ports that they use as these are not the defaults.
Overall, the change has worked well for me. Google is doing a good job handling spam, I can access the mail from anywhere, I can avoid the ads by using Thunderbird, and I can give up running my own server. It's a win all around. At some point I may upgrade to their premier edition but I don't see a real need to do that right now.
One less thing to worry about... and no, I don't worry about Google...
Tuesday, January 27, 2009
AWS EC2 ec2-bundle-vol and Ruby problem
When you want to bundle an image on an Amazon Web Services EC2 node you run the 'ec2-bundle-vol' script. This is a Ruby script that performs all sorts of magic.
Be aware of the following problem if you install your own version of Ruby
I'm running a Fedora Core 8 node and the latest version of Ruby that I can get using the yum updater is 1.8.6 - but I want 1.8.7 - so I installed from source into /usr/local/bin. I have /usr/local/bin ahead of /usr/bin in my path so I get to see the 1.8.7 version and I can leave the old version alone.
But when I try to bundle an EC2 image I get this:
The problem appears to be tied to the new version. I can fix it by temporarily changing my path so that I pick up the 1.8.6 version of Ruby
And now the command works... of course you will need to run the command with your certificates etc. You will probably see a verbose message about rsync exiting with an error code - ignore it.
Follow that with a call to ec2-upload-bundle
Make sure you reset your path after this so you can get the latest version of Ruby. I guess you can also rename /usr/bin/ruby (1.8.6) and then symlink in the 1.8.7 version.
I have so many issues with installing separate versions of ruby on Mac and Linux systems. All I really want to do is be able to upgrade the default installation to the latest version. Not sure why that is so difficult with yum, etc.
Be aware of the following problem if you install your own version of Ruby
I'm running a Fedora Core 8 node and the latest version of Ruby that I can get using the yum updater is 1.8.6 - but I want 1.8.7 - so I installed from source into /usr/local/bin. I have /usr/local/bin ahead of /usr/bin in my path so I get to see the 1.8.7 version and I can leave the old version alone.
But when I try to bundle an EC2 image I get this:
# ec2-bundle-vol
/usr/lib/site_ruby/ec2/amitools/bundlevol.rb:11:in `require': no such file to load -- ec2/amitools/bundle (LoadError)The problem appears to be tied to the new version. I can fix it by temporarily changing my path so that I pick up the 1.8.6 version of Ruby
# PATH=/usr/bin:$PATHAnd now the command works... of course you will need to run the command with your certificates etc. You will probably see a verbose message about rsync exiting with an error code - ignore it.
Follow that with a call to ec2-upload-bundle
Make sure you reset your path after this so you can get the latest version of Ruby. I guess you can also rename /usr/bin/ruby (1.8.6) and then symlink in the 1.8.7 version.
I have so many issues with installing separate versions of ruby on Mac and Linux systems. All I really want to do is be able to upgrade the default installation to the latest version. Not sure why that is so difficult with yum, etc.
Monday, January 19, 2009
Setting up the Starling Messaging Server
Starling is a simple messaging server for distributed queuing. It was written by Blaine Cook and colleagues at Twitter and is used extensively by them. It has been released as open source and is becoming widely used. It is written entirely in Ruby and uses the memcache protocol for communication.
I am looking at it as a simple way to manage distributed tasks on my local network. The basic idea is similar to other queuing systems like Amazon's SQS. It has benefits and disadvantages compared to other systems. The benefits for me are that it is simple to set up and use.
The basic idea is that you run a Starling server on one machine, listening on a specific address and port. Other machines can set or get messages from an arbitrary number of queues on the server. It should be used on a trusted network as it has no security.
Fetch the latest version as a rubygem from github at http://github.com/starling/starling/tree/master. You will also need the fiveruns-memcache-client (at least as of Jan 2009)
This should also install the eventmachine gem for you if needed.
NOTE I have not been able to install the eventmachine gem on Fedora 7 because of some problem finding -lruby. I think it has to do with having lib and lib64. Anyone got a fix for that?
The gem has two components - a starling executable that implements the server and the ruby library that you use to interact with it.
You need to copy the executable out of the gem directory. The default gem directory on Ubuntu is /var/lib/gems/1.8/gems and on (my) Mac OS X it is /usr/local/lib/ruby/gems/1.8/gems/. The current version is installed under starling-starling-0.9.9
I'm just going to cover the Ubuntu installation here:
I had to edit the first line of both of these Ruby scripts to point to where my Ruby interpreter was installed (#!/usr/bin/env ruby)
Test out the installation by running the server as root
This will start up a server on the default address of 127.0.0.1 and port 22122
To have the server run as system start:
1: Copy the example init script from the gem etc directory.
2: Edit the file to change the user and group to root. This is not ideal. You should create a starling user and group but I have not been able to get this to work - probably just a permissions issue - any fixes to this are welcomed. You also need to change the IP address on which to run the service from the default of 0.0.0.0
3: Create the log directory /var/log/starling
Look at the contents of /var/log/starling/starling.log if you have problems.
4: Create the spool directory /var/spool/starling that starling uses to back up its queues. Each queue will get a separate binary file. Poke around in the contents of these using 'od -c' if you are so inclined. (Starling may create this automatically - but it does NOT create the log directory)
5: Start/stop the server
6: Set up the appropriate symlinks in the /etc/rc* directories. On Fedora I would use chkconfig for this but it barfs on Ubuntu for me. Setting them manually I created K08starling in rc0.d, rc1.d and rc6.d and S92starling in rc3.d, rc4.d, rc5.d and rc6.d
To use Starling to manage messages you will use the Ruby client library. The interface is refreshingly simple. Test it out using irb:
Note that the Starling.new call makes a connection to the server which should already be running. It does not itself start a server. Also note that a call to get() when there are no messages in the queue will just hang waiting for the next message. So check first with sizeof(queue) if you don't want that to happen.
There are no hard and fast limits as to how large messages can be, unlike Amazon SQS. But I would imagine that very large messages are going screw up your performance. Remember this is using a memcache-like architecture and so memory can become limiting. Starling is designed to handled lots of small messages so it's probably best to use it in this way.
Starling is written entirely in Ruby. The documentation for the gem is reasonable. Look at the code in the gem if you need to really understand what is going on.
To use Starling within Rails applications you should look at the Workling plugin
I am looking at it as a simple way to manage distributed tasks on my local network. The basic idea is similar to other queuing systems like Amazon's SQS. It has benefits and disadvantages compared to other systems. The benefits for me are that it is simple to set up and use.
The basic idea is that you run a Starling server on one machine, listening on a specific address and port. Other machines can set or get messages from an arbitrary number of queues on the server. It should be used on a trusted network as it has no security.
Fetch the latest version as a rubygem from github at http://github.com/starling/starling/tree/master. You will also need the fiveruns-memcache-client (at least as of Jan 2009)
$ gem sources -a http://gems.github.com/
$ sudo gem install fiveruns-memcache-client
$ sudo gem install starling-starlingThis should also install the eventmachine gem for you if needed.
NOTE I have not been able to install the eventmachine gem on Fedora 7 because of some problem finding -lruby. I think it has to do with having lib and lib64. Anyone got a fix for that?
The gem has two components - a starling executable that implements the server and the ruby library that you use to interact with it.
You need to copy the executable out of the gem directory. The default gem directory on Ubuntu is /var/lib/gems/1.8/gems and on (my) Mac OS X it is /usr/local/lib/ruby/gems/1.8/gems/. The current version is installed under starling-starling-0.9.9
I'm just going to cover the Ubuntu installation here:
$ sudo cp /usr/local/lib/ruby/gems/1.8/gems/starling-starling-0.9.9/bin/starling /usr/local/bin/starling
$ sudo cp /usr/local/lib/ruby/gems/1.8/gems/starling-starling-0.9.9/bin/starling_top /usr/local/bin/starling_topI had to edit the first line of both of these Ruby scripts to point to where my Ruby interpreter was installed (#!/usr/bin/env ruby)
Test out the installation by running the server as root
# starlingThis will start up a server on the default address of 127.0.0.1 and port 22122
To have the server run as system start:
1: Copy the example init script from the gem etc directory.
$ sudo cp /usr/local/lib/ruby/gems/1.8/gems/starling-starling-0.9.9/etc/starling.ubuntu /etc/init.d2: Edit the file to change the user and group to root. This is not ideal. You should create a starling user and group but I have not been able to get this to work - probably just a permissions issue - any fixes to this are welcomed. You also need to change the IP address on which to run the service from the default of 0.0.0.0
DUSER=root
DGROUP=root
LISTEN=192.168.1.1
3: Create the log directory /var/log/starling
Look at the contents of /var/log/starling/starling.log if you have problems.
4: Create the spool directory /var/spool/starling that starling uses to back up its queues. Each queue will get a separate binary file. Poke around in the contents of these using 'od -c
5: Start/stop the server
# /etc/init.d/starling start6: Set up the appropriate symlinks in the /etc/rc* directories. On Fedora I would use chkconfig for this but it barfs on Ubuntu for me. Setting them manually I created K08starling in rc0.d, rc1.d and rc6.d and S92starling in rc3.d, rc4.d, rc5.d and rc6.d
To use Starling to manage messages you will use the Ruby client library. The interface is refreshingly simple. Test it out using irb:
$ irb --simple-prompt
>> require 'rubygems'
=> true
>> require 'starling'
=> true
>> star = Starling.new('192.168.1.1:22122')
=> <MemCache: 1 servers, 1 buckets, ns: nil, ro: false>
>> star.available_queues()
=> []
>> star.set('myqueue', 'Hello World')
=> nil
>> star.available_queues()
=> ["myqueue"]
>> star.sizeof('myqueue')
=> 1
>> msg = star.get('myqueue')
=> "Hello World"
Note that the Starling.new call makes a connection to the server which should already be running. It does not itself start a server. Also note that a call to get() when there are no messages in the queue will just hang waiting for the next message. So check first with sizeof(queue) if you don't want that to happen.
There are no hard and fast limits as to how large messages can be, unlike Amazon SQS. But I would imagine that very large messages are going screw up your performance. Remember this is using a memcache-like architecture and so memory can become limiting. Starling is designed to handled lots of small messages so it's probably best to use it in this way.
Starling is written entirely in Ruby. The documentation for the gem is reasonable. Look at the code in the gem if you need to really understand what is going on.
To use Starling within Rails applications you should look at the Workling plugin
Wednesday, January 7, 2009
Ruby and the RubyInline gem
I wanted to transfer a Ruby app that used the Inline gem to a Linux machine and had trouble getting it to work. Here are the steps needed to make it work.
The ruby code uses the Inline gem which allows you to write inline C code in your application for better performance. The code itself includes this line:
In transferring it to a new machine (linux in this case - Fedora and Ubuntu machines in fact) I would get the error "undefined method 'inline'".
I figured this meant I did not have the 'inline' gem so I ran 'sudo gem install inline'. But after that I still got the same error... WRONG GEM! I finally figured out that I want to install RubyInline not inline... plus you also need the hoe gem
Tried running the app and this time I got:
This tells me that I need a development version of Ruby with all the header files. A regular ruby install does not give you this.
On Mac OS X you need to install the Xcode developer tools.
On Ubuntu you need to do this:
On Fedora you would do:
Try it once more and it should work!
The ruby code uses the Inline gem which allows you to write inline C code in your application for better performance. The code itself includes this line:
require "inline"In transferring it to a new machine (linux in this case - Fedora and Ubuntu machines in fact) I would get the error "undefined method 'inline'".
I figured this meant I did not have the 'inline' gem so I ran 'sudo gem install inline'. But after that I still got the same error... WRONG GEM! I finally figured out that I want to install RubyInline not inline... plus you also need the hoe gem
$ sudo gem install RubyInline
$ sudo gem install hoeTried running the app and this time I got:
ERROR: Can't find header dir for ruby, Exiting...This tells me that I need a development version of Ruby with all the header files. A regular ruby install does not give you this.
On Mac OS X you need to install the Xcode developer tools.
On Ubuntu you need to do this:
$ sudo apt-get install ruby-devOn Fedora you would do:
$ sudo yum install ruby-develTry it once more and it should work!
Subscribe to:
Posts (Atom)