Every repository with this icon (
Every repository with this icon (
Ubuntu Hardy 8.04 / Slicehost setup
As of Jul 21, the getting started page doesn’t quite work for me.
After trying several solutions, the only one that worked was to just install everything from source, which isn’t as bad as it sounds, really!
Here is a touched up console log of installing merb/feather on Hardy on a 256mb slicehost server.
Estimated time: ~10-20 minutes, barring problems on your side.
Hopefully this will help other people.
This solves errors like:
do_sqlite3 checking for sqlite3.h... no
uninitialized constant DataMapper Logger WARN
data_objects requires extlib (>= 0.9.3, runtime)
etc.
So, here we go.
1) Before we get started, let’s make sure that we have a bit of database stuff setup.
sudo apt-get install mysql-server mysql-client libmysqlclient15-dev #this is from a slicehost tutorial
sudo apt-get install libsqlite3-dev
2) Now let’s install ruby gems from source, to get the latest version.
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
tar -xzvf rubygems-1.2.0.tgz
cd rubygems-1.2.0
sudo ruby setup.rb
gem -v # this should be 1.2.0
3) The required gems for DM and Merb are pretty hefty. Make sure that you have all of these installed. Each one will keep you from completing the installation!
Note that some of these might be in the wrong order, and I may have missed some, but this should be almost a full list. Do add any that I’ve missed.
-—
I experienced problems installing the final gem, libxml-ruby, and had to run the following before being able to install the gems or Merb:
sudo apt-get install libxml2-dev
sudo gem install ParseTree -v=2.1.1
sudo gem install rack
sudo gem install ruby2ruby -v=1.1.8
sudo gem install sake
sudo gem install rspec
sudo gem install english
sudo gem install addressable
sudo gem install erubis
sudo gem install json_pure
sudo gem install mime-types
sudo gem install mongrel
sudo gem install hpricot
sudo gem install archive-tar-minitar
sudo gem install tzinfo
sudo gem install memcache-client
sudo gem install libxml-ruby
4) Now let’s get sake.
sake -i 'http://edgy.4ninjas.org/edgy.sake'
sudo sake -i http://datamapper.org/dm-dev.sake
5) Now we have to get the latest code from github. The order matters here.
git clone git://github.com/sam/do.git
git clone git://github.com/sam/extlib.git
cd extlib
sudo rake install
cd ..
cd do
cd data_objects/
sudo rake install
cd ..
cd do_mysql #only if you want mysql
sudo rake install
cd ..
cd do_sqlite3 #only if you want sqlite3
sudo rake install
cd ..
6) Now that we have this setup, let’s actually install Merb, lol.
sake edgy:install packages="merb"
#this fails without telling you, unless you look at the output, if you are missing gems, it will tell you
# get this to succeed before moving on
7) If the above command runs without errors, move on to the one below. Since we’ve installed do_sqlite3 and do_mysql from source, enter No when the installer asks you if you want to do a clean install!!.
sudo sake edgy:install packages="do"
# note that it will fail for the sql types that you don't have setup
8) Now we can finally install feather.
git clone git://github.com/mleung/feather.git
git clone git://github.com/edraper/feather-plugins.git
cd feather
merb-gen
9) Time to setup the db.
vim config/database.yml (or nano, if you are weak)
Enter in this, from the getting started page:
:development: &defaults
:adapter: sqlite3
:database: db/development.sqlite3
:test:
<<: *defaults
:database: db/test.sqlite3
:production:
<<: *defaults
:database: db/production.sqlite3
10) Almost there, now a bit of db setup, then 2 console commands.
mkdir db
merb-gen
merb -i
11) Now, in the console type:
Database::initial_setup
DataMapper.auto_migrate!
quit
12) This is a bit anti-climactic, but now just go
merb
and go to yourserver:4000
HTH!






