[Originally published 26 February 2012]
Holla is an open-source Campfire clone written in ruby. I had heard about Campfire but as a student, have no real ability to pay for it, so I decided to search for open source/free alternatives and stumbled upon Holla. Seemed worthwhile to throw in a vm and play with. It was quite the ride.
I started off with an Ubuntu 10.04 box trying to install Holla. That didn’t work too well, I ran into troubles getting the right version of everything installed. Despite my view that
arch linux shouldn’t be used in a production environment, I was pretty sure it would have up-to-date packages, so I spun up a vm of arch on my
HP MicroServer running ESXi and went to town.
The instructions on holla’s site to install holla are as follows:
- bundle install
- rake db:migrate
- rails server thin
- start the Juggernaut server – http://github.com/maccman/juggernaut
- Now go to http://localhost:3000
Simple, right? Well it looks like we need juggernaut. Instructions to install juggernaut on juggernaut’s site:
- Install Node.js
- Install Redis
- Install Juggernaut
- Juggernaut is distributed by npm, you’ll need to install that first if you haven’t already.
- Install the Juggernaut client gem
Sweet! I can do that. Time to spin up a vm and get cracking. After installing the base system, I need to install some basics:
# pacman -S git openssh curl base-devel sudo screen vim
At this point, I created a user for myself. This is important. If you run everything as root, you get some wonky problems later on. I added myself to wheel and to the ruby groups.
At this point, I learned the hard way. Snapshots are your friends. If you’re doing this on a vm, take a snapshot now. Do it.
Now, for some specifics to this project:
# pacman -S redis nodejs libxslt
Now, log in as your newly created user and it’s time to install ruby. To install ruby, I’m going to use
rvm. Holla needs a specific version of ruby, and I ran into some troubles installing the base arch package:
$ bash -s stable < $ source ~/.bash_profile
$ rvm requirements
$ rvm install 1.9.2
set default ruby:
$ rvm alias create default ruby-1.9.2-p290
Now, to install rubygems. I installed from source:
$ wget http://rubyforge.org/frs/download.php/75856/rubygems-1.8.17.tgz
$ tar xvzf rubygems-1.8.17.tgz
$ cd rubygems-1.8.17
$ ruby setup.rb
Now we’re starting to get somewhere! We have ruby installed! Now we need to install juggernaut, so onto install
npm to install juggernaut
with. I had to install this as root, even with sudo it wouldn’t install for some reason.
# curl http://npmjs.org/install.sh | sh
These guys have some tricky installers. That’s the second time we’ve ran a script we got through curl in a one-liner.
So we have npm. Time to install juggernaut.
$ sudo npm install -g juggernaut
Now, to install its gem:
$ gem install juggernaut
Great! Now we can start installing holla (finally!). First we need to clone the repository, install Gem bundler then run ‘bundle install’. Note that you have to re-source your .bash_profile to be able to use bundler.
$ gem install bundler
$ source .bash_profile
$ git clone git://github.com/maccman/holla.git
$ cd holla
$ bundle install
[...]
An error occured while installing linecache19 (0.5.11), and Bundler cannot continue.
Make sure that `gem install linecache19 -v '0.5.11'` succeeds before bundling.
Well, that stinks. Fortunately, I found a
fix.
$ gem install ruby-debug19 -- --with-ruby-include=\$rvm_path/src/ruby-1.9.2-p290
Great. That’s done. Back to bundle install.
$ bundle install
[...]
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Whoo! It worked. Onto step 2 (ha ha ha…we’re just on step 2???). Using bundle exec didn’t fix rake for me, but the following did. I found the fix
here.
$ rake db:migrate
You have already activated rake 0.9.2, but your Gemfile requires rake 0.8.7. Using bundle exec may solve this.
$ gem install rake
$ bundle update rake
$ rake db:migrate
Next, step 3:
$ rails server thin
Finally, starting juggernaut
$ redis-server
$ juggernaut
Head out to your server’s hostname or IP on port 3000 on a browser (make sure you use Chrome or Safari and you’ll have to log in with
twitter)! Then, hopefully, it works like mine! Add a channel to get started, then test it!
And there you go!That’s it! I was rather surprised it was working. This was the fourth try of the weekend and I was about ready to throw in the towel. Good luck to you if you try it! It was a super fun project and hopefully it will work for you!
Recent Comments