Rails is wonderful but if you're new to web development, I suggest you give Sinatra a try first. Not only is it excellent for building small web apps, concepts such as routing are much easier to understand and learn.
Install Sinatra Framework
gem install sinatra
DataMapper is broken up into the core library,
dm-core, various database adapters and a number of optional libraries collectively:
gem install data_mapper
Install things piece by piece:
gem install dm-core
Pick a database adapter:
#MySQL gem install do_mysql #Postgresql gem install do_postgres gem install dm-sqlite-adapter
sudo gem install Haml
model.rb starts with
require 'rubygems' require 'dm-core' #require 'dm-constraints' require 'dm-migrations' require 'sinatra' require 'sinatra/reloader' if development? DataMapper::Logger.new($stdout, :debug) DataMapper.setup(:default, 'mysql://localhost/ruby_shortner')
Reloader is great for restarting your computer every time you make a file edit.
gem install sinatra-contrib
Add this to
require 'sinatra' require 'sinatra/reloader' if development?