dnite’s ‘old’ Blog

For my new blog, head over to http://blog.dnite.org

  • Moved Out!

    Thanks for stopping by my blog! It's been fun over here at Wordpress.com but I've moved to bigger, better things. My new blog is located here! Hope to see you there!

Archive for the ‘Linux’ Category

Acid 2 test results…

Posted by dnite on December 28, 2006

Today, while very bored, I decided to give Firefox 3 a download. To my surprise, a brand new build was released on this very day! Lucky times for me! This got me thinking about the acid 2 test that I had recently read about firefox 3 passing. I knew they had passed the test after they released the last alpha release of firefox 3, but this was a brand new release so I had to test it out. Instead of just sharing the results of firefox 3, I decided to grab the latest 2.0.0.1 release of firefox as well as Opera 9.10. I’m running Ubuntu Linux (6.10, Edgy), so I’ll also be sharing Internet Explorer 7‘s ‘results’ from inside VMware. Click any of the images to view them at their full resolution.

The first browser I opened up and tried was The latest Firefox most of you are probably using right now. Firefox 2.0.0.1 was released shortly ago which is essentially just a few bug fixes and a vulnerability plug. Definately not the best results. You might be able to tell that it’s supposed to be a face, but that’s about it.

Firefox 2.0.0.1 Acid 2 Test

Firefox 3 was next. I was excited about this one because it should have passed the test. But sadly, it did not. It came really, really close. But not quite. My only guess is that the new gecko engine changes didn’t make it into the this newest build? Not sure, but still impressive results.

Firefox 3 Alpha2 Pre Acid 2 Test

Next came Opera. I had read a while back that Opera had passed the acid 2 test, but I never actually tested it. It was true. Opera passed with flying colors. This is what the test is supposed to look like for those of you who’ve never seen the test.

Opera 9.10 Acid 2 Test

The next was just for my own entertainment. Internet Explorer 7. I went out of my way to load up my virtual machine to test this one but, my lord, I didn’t think it was going to be this bad. Can anyone tell me what this is? Or maybe how Microsoft feels they are more standards compliant than they were before Internet Explorer 7? I didn’t want to go through the trouble of getting a version of IE6 running, so I just hunted down a picture of what it’s test looked like, it’s not much better. I even gave them the benefit of the doubt and noticed the souce for the test doesn’t contain a strict doctype, so I changed it and still got the same results. The only difference that strict made was the scroll bars didn’t appear.

Internet Explorer 7 Acid 2 Results

There we have it. The few popular browsers I was able to test pretty quickly. The only browser I would have liked to include but couldn’t, was Safari. I need to get me a mac. Who wants to send me a macbook pro so I can post the results of the acid 2 test?? Donations welcome! x=)

Advertisements

Posted in Blogs, Linux, Tech News, Web development | 2 Comments »

Transmission on Ubuntu Edgy

Posted by dnite on November 16, 2006

I miss my uTorrent. I could (and have) run uTorrent in wine while running Linux, but that just sucks. So I went looking for a better client. I don’t like BitTornado, or the included bittorrent client that comes with Edgy. They’re ugly and I don’t feel like they work very well. So I found Transmission. Transmission is very light weight. Very simple. It just works. I have recently read that some private trackers have banned Transmission, because it does (or maybe used to?) update the tracker more often than it’s suppose to, but unless I see any big problems (which I will report here) I am going to use it because I like it. For those of you who want to use Transmission with Ubuntu Edgy and are ripping your hair out because you can’t find a good repo. Here it is. Took me a while to find it, but I like using the repo, because it gets updated pretty often.

deb http://acorbeaux.free.fr/ubuntu edgy transmission

Add this repo to your /etc/apt/sources.list and then run the following.

sudo apt-get install transmission

There you have it. A up to date version of Transmission. Run it with the following and your all set. The first time you try and open a torrent in firefox after installing Transmission, click the dropdown, select Other and enter the command below with /usr/bin/ before it and it should stick.

transmission-gtk

Happy bittorrent.. ing..

Posted in Linux, Ubuntu | 5 Comments »

More Ruby on Rails with Ubuntu… (rails.vim)

Posted by dnite on November 10, 2006

UPDATE: I have updated this entry on my new blog at blog.dnite.org. That link is a direct link to the updated article.

I wrote an article not too long ago about installing Ruby on Rails on Ubuntu (Edgy) quickly and easily. The one section I left pretty ‘in the air’ was definitely the IDE. I feel that Linux has the biggest choice when it comes to editor options.

If your using Windows, you’ll probably use RadRails. It’s feature rich. It does everything you need. And windows Java machine just seems to work more efficiently, in my experience, than the ones for linux. If anyone wants to give me some hints to improve my java machines performance, go right ahead. On the mac. You have TextMate. Mac’s also have a lot of options, but from what I’ve heard and seen. Very seldom do you develop Rails applications on a mac without using textmate.

Now, for Linux, you have a variety of things to choose from and I’ve dipped my hands in a few of them. First, I tried RadRails. RadRails is what I used in windows and it was familiar to me. Since it runs on all 3 platforms, I figured I’d give it a shot in Linux. The problem was, that it just seemed a lot slower than it ran in Windows. I’m not exactly sure why this is, but speed and reliability were the reasons I went looking for a better alternative. I did some research and found that some people used jEdit. But getting jEdit to work in Edgy was a chore, do I didn’t even try. gEdit was also another option. It highlights syntax. It can take plugins. It’s a pretty light weight editor. I tried this for a couple of days, but it just didn’t feel right.

Over in the #rubyonrails IRC channel on irc.freenode.net, I heard about vim and a plugin called rails.vim. I’d given vi a try a long time ago. But never a substantial try. It was always really confusing to get into right away. It’s just not like most other editors. But I figured I’d give it a shot anyways. After a week or so of working with Vim and rails.vim, I’m pretty sold. I’m not 100% comfortable with it just yet, but I can definitely see the potential. I find myself hitting ESC and starting to type :wq when quickly editing something in gEdit or something. Rails.vim takes vim a step further and adds a ton of nice Rails features. Here’s what I did to get into and start enjoying using vim in a couple of days.

First and foremost. Make sure you have Vim installed. Pretty simple. The vimtutor command is optional but VERY VERY recommended if you’ve never used vim. Take the half hour to complete the tutor and you will understand vim a lot better.


sudo apt-get install vim-common vim-runtime vim-gnome
vimtutor

Now that you have vim installed, let’s install the vim ruby gem that gives you all the nice syntax highlighting and other cool ruby features. When you run vim-ruby-install.rb, it gives you the option to install to your home folder. I picked this option, so make sure you don’t run this with sudo.


sudo gem install vim-ruby --remote
vim-ruby-install.rb
(select option 1 when it asks where you want to install. /home/username/.vim)

Now you should have Vim installed with some nice ruby stuff. Let’s go ahead and make a startup file to get rid of a few vim annoyances. Create a new file called .vimrc in your home directory (~/.vimrc) and add the following.


set nocompatible
syntax on
filetype plugin indent on
set mouse=a

runtime! macros/matchit.vim

augroup myfiletypes
autocmd!
autocmd FileType ruby,eruby,yaml set ai sw=2 sts=2 et
augroup END

Now, all we have to do is download rails.vim. Head over to rails.vim and download the latest version. There should be a plugin directory and a doc directory in this archive. Extract it to your .vim folder and your all set. The last thing you have to do is enable the rails documentation.


vim
:helptags ~/.vim/doc

With rails.vim installed, you can launch vim from your project directory and have a lot of new functions. If you try :Rmodel user (which tab completes very nicely), it opens up app/models/user.rb. :Rcontroller blog will open up app/controllers/blog_controller.rb. Everything works just like you would expect it to. You can tab complete the commands and the filenames. If you don’t know what file your looking for, leave the filename off and start hitting tab. You’ll just cycle through all the models or controllers or views. :Rextract will take a currently highlighted section of your code, and automatically create a new partial file while replacing the current selection with the render :partial call. Also, if you move the cursor over another controller name or model name or anything similar and press gf, you will open up that file. It takes a little getting used to but it really works. For a completely list of everything that rails.vim can do, type :help rails. There’s a lot you can do.

Hope that helped out some people! Enjoy!

Posted in Linux, Ruby on Rails, Ubuntu, Web development | 10 Comments »

Pretty Widgets for Firefox for Linux

Posted by dnite on October 28, 2006

So.. The switch to Ubuntu has had it’s ups and downs. But one annoyance I had was the un-styled ‘widgets’ in Firefox look like ass. So, I did some research and found that the people in the MacOSX camp seem to care a lot more about this than the Linux camp. There are a few options for MacOSX to make the widgets look nicer. And I found one person who customized it a little bit to work with Linux. I made a couple minor tweaks and repackaged it and am now sharing with all. This version has only been tested with Firefox 2.0, and if your not using Firefox 2.0 yet, I’d suggest upgrading anyways. Download it here! Enjoy!


Digg!

Posted in Linux, Ubuntu | 1 Comment »

Ruby on Rails on Ubuntu

Posted by dnite on October 24, 2006

This post has moved over to my new home. blog.dnite.org. Head over there for any updates or whatever.

It seems as though all the information for getting a full Ruby on Rails system up and running in Ubuntu is pretty scattered about the web, so I thought this makes a perfect opportunity to go ahead and condense it all in one place. From start to finish.. Here we go..

Install Ruby

First we need to install ruby and a few extra things so we don’t have issues later. just installing ruby will work to some degree, but things will break later.

sudo apt-get install ruby ruby1.8 ruby1.8-dev rdoc ri irb

Install MySQL

A lot of Rails folks like to use sqlite.. i haven’t tested it but I believe that’s as easy as ‘sudo apt-get install sqlite3’. Could involve more steps though. Here’s what I did to install MySQL.

sudo apt-get install mysql-server libmysql-ruby

Then, just to be safe, lets add a password for root.

mysqladmin -u root password NEW_PASSWORD
sudo /etc/init.d/mysql restart

You may want to go ahead and create your databases now, or save it for later…

mysql -u root -p

Install Ruby Gems

Ruby Gems will install a majority of Rails and any other cool stuff we need specific to Ruby. There’s no package of it availiable for ubuntu (as of right now) so you’ll have to download it yourself. The current version as of today is 0.9.0, but make sure that’s the most current version before following the steps below exactly by going to http://rubyforge.org/frs/?group_id=126. If it’s not, then just replace the url below with the url to the most current version.

wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
tar zxvf rubygems-0.9.0.tgz
cd rubygems-0.9.0
sudo ruby setup.rb

Install Rails

Next it’s time to install Rails. If you followed all the directions till now, it shouldn’t be a problem. I have run into the problem of rdoc spilling out a bunch of errors if you failed to install that. I’ve also read that you have to be in your home dir to perform this step. Not sure if that’s true, but it couldn’t hurt.

cd
sudo gem install rails --include-dependencies

Install an IDE (optional)

You should now have a fully operational Ruby on Rails install right now. The next step would be to choose how you want to work on your web applications. Linux has a whole slew of editors you can use. Vim is a popular choice among the rails novices. If your looking for something a little more user friendly and easy to get into, RadRails is very nice for this. There is no package for RadRails, but lucky enough, RadRails is enclosed in a single folder you can toss just about anywhere and run from there. I extracted it to /opt/radrails and created a small file to run it in /usr/bin… This is all completely up to you. However you feel most comfortable working.

EDIT: I actually did a new piece on using Vim as your ‘IDE’ for rails. Take a look.

Install RMagick (optional)

Another problem I ran into was getting ImageMagick and RMagick installed and working right in ubuntu. If you will be needing photo manipulation support for your web app, use these instructions for installing RMagick.

sudo apt-get install imagemagick
dpkg -l | grep magick

You will see a list of the imagemagick packages that were installed. There should be one that starts with lib and ends with a number. Mine was libmagick9, so below, if you have anything but libmagick9, replace the number below.

sudo apt-get install libmagick9-dev
sudo gem install rmagick

rmagick takes a little while to build. So go grab something to eat or drink.

Conclusion

Looking back, getting Ruby on Rails is not all that hard to do in ubuntu, but having information that was either old or scattered in many places made it a pain in the ass for me. So I hope someone comes across it helps them out a bit. I’m pretty sure I got all the instructions right, but if something happens to not work, leave a comment and I’ll try and help.

EDIT:
It would figure that the first day that wiki.rubyonrails.com is down in.. forever? is the day that I chose to try and install rails on ubuntu myself. Most of this information is up there, but I went ahead and added the last part about image magick there, So check out wiki.rubyonrails.com.. You can get just about anything there. x=)

Posted in Linux, Ruby on Rails, Ubuntu, Web development | 14 Comments »