Follow me as I struggle with rogue technology, insane programmers, and impossible math questions in a battle to the death.

Monday, January 14, 2008

The terrors of detecting Eclipse

I was trying to install Adobe Flex Builder 2 Plug-in for Eclipse along with the Flex SDK when I encountered a problem. I was confronted with a screen in the installer that said:

Please choose an existing Eclipse folder (3.1 or greater), to be updated with the Flex Builder 2 Plug-ins.

This folder must contain the eclipse.exe file, and the standard Eclipse folder name "configuration".


I chose the directory for my Eclipse 3.3.1.1 and got this error:

Please choose an existing Eclipse folder (3.1 or greater) to be updated. This folder must contain eclipse.exe and the standard folder named "configuration"


I found other people who had the problem on the Adobe Forums.

It seems like the only solution is to install an older version of Eclipse.

This is not the first time I've had this problem with Eclipse. When I was experimenting with the Oracle BPEL Process Manager, I tried to install an Eclipse based plugin that would allow you to graphically create BPEL systems. I ran into the same exact error, and eventually had to install a second copy of an older version of Eclipse to get the plugin to install.

I'm curious about the process a developer goes through to detect Eclipse. Based on the appearance of both of these installation programs I've seen, I assume they are both Java based. This makes me think they are using the same code base for their respective installers, and the person at fault is not Oracle or Adobe, but the person who wrote the Java installer, or the Eclipse foundation.

Labels: , , ,

Thursday, January 10, 2008

Error sending messages in Thunderbird

The error is that Thunderbird refuses to send mail over SMTP, even though it can receive mail.

When I tried to send email, Thunderbird spewed forth this error message:

Sending of message failed.
The message could not be sent because connecting to SMTP server mail.mitre.org failed. The server may be unavailable or is refusing SMTP connections. Please verify that your SMTP server setting is correct and try again, or else contact your network administrator.


After a few days of experimenting, checking every single setting in my Thunderbird profile, swearing mighty oaths, and cursing at my need to resort to using webmail, I finally found the answer.

I rebooted.

The problem went away.

I have no idea why this has happened, twice. The first time I encountered the problem I ended up completely deleting my profile and reinstalling Thunderbird before I found the answer. I've only seen this problem on my Windows XP laptop at work, so it may be a problem with the Windows version of Thunderbird.

Labels: , , ,

Vim tags

My favorite text editor is vi, specifically vim in window mode. I can write code and search through a single file much quicker than any other editor due to my memorization of vi's large and powerful command base. The only place vi is weak compared to a heavyweight IDE like Eclipse is when I need to look up the definition of some function I've called that is defined in a different file. The process of opening that file by typing out the entire path can be quite laborious.

Today someone I work with generated tags for the project we're working on that are usable with vi. Though I'd heard about ctags in the past I never had time to sit down and really figure them out. When you combine the ctags Unix command, the taglist plugin for vim, some changes to your vimrc and a small vim script, you can easily get the same functionality as one of those heavy IDEs. Now I can simply put my cursor over the function or variable in question and type a key command to jump to the file and line containing the definition.

Unfortunately, there is a learning curve to set up the tags, whereas Eclipse configures its internal tags for you automatically. However, I have noticed that if you don't originally create your project in Eclipse, the migration can often be a painful experience. Vi gives you the freedom in that it is not an environment that your project exists inside, but an editor which you use to view your project, however you may have set it up.

Labels: , , ,

Wednesday, January 09, 2008

Ruby on Rails + Ubuntu = Hostility

I was considering trying Ruby on Rails for a project I'm working on and decided to try and install it on Ubuntu.

jfenwick@mars:~$ sudo gem install rails --include-dependencies
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find rails (> 0) in any repository


I did some searching on the internet and found that the gem server randomly can't find gems, but if you try again later it works. Eventually I did get the rails gem and its dependencies installed, but now the second major problem. I attempted to create an application skeleton and got:

jfenwick@mars:~/projects$ rails foo
The program 'rails' is currently not installed. You can install it by typing:
sudo apt-get install rails
bash: rails: command not found


Did some more searching, found that if you install gems using apt-get there are permissions problems. So I removed gems, go back to the rails site, download gems, try to install it and get:

jfenwick@mars:~/Desktop/rubygems-1.0.1$ ruby setup.rb
mkdir -p /usr/local/lib/site_ruby/1.8/rbconfig
/usr/lib/ruby/1.8/fileutils.rb:243:in `mkdir': Permission denied - /usr/local/lib/site_ruby/1.8/rbconfig (Errno::EACCES)
from /usr/lib/ruby/1.8/fileutils.rb:243:in `fu_mkdir'
from /usr/lib/ruby/1.8/fileutils.rb:217:in `mkdir_p'
from /usr/lib/ruby/1.8/fileutils.rb:215:in `reverse_each'
from /usr/lib/ruby/1.8/fileutils.rb:215:in `mkdir_p'
from /usr/lib/ruby/1.8/fileutils.rb:201:in `each'
from /usr/lib/ruby/1.8/fileutils.rb:201:in `mkdir_p'
from /usr/lib/ruby/1.8/fileutils.rb:1527:in `mkdir_p'
from setup.rb:88
from setup.rb:85:in `each'
from setup.rb:85
from setup.rb:82:in `chdir'
from setup.rb:82


Weak.

I found this site, it helped a lot: urbanpuddle

When I tried to install Mongrel I got this error:


jfenwick@mars:~/projects/foo$ sudo gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb install mongrel
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1/ext/fastthread/gem_make.out


This was my fault as I hadn't installed the ruby1.8-dev package. However, I still think the process of finding which packages you need to install through apt-get, and which ones you have to install through gems is maddening.

During my searching I came across a person who had my problem with Mongrel, and someone asked if they were "on Debian or something equally hostile to Ruby". I feel that's a fair judgment, getting Rails to work on Ubuntu has been pretty laborious.

Labels: , , , , ,