Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DataMapper
- Groups Alerts Groups Alerts
- Create a group...
- Google Groups Home Recently Visited Groups | Help | Sign in
- DataMapper
- Home
- Discussions
- Pages
- Files
- About this group
- Join this group
- Recent pages and files
- do_sqlite3-0.9.0-x86-mswin32-60.gem Apr 28
- do_postgres-0.9.0-x86-mswin32-60.gem Apr 28
- do_mysql-0.9.0-x86-mswin32-60.gem Apr 28
- Installing DM edge + Merb Apr 24
- do_mysql-0.2.2.gem Dec 23
- data_mapper_1.sql May 27
- Installing DM edge + Merb
- Git the code you need
- You'll need to either clone the following projects, or download tarballs from github and unpack them. The former is probably a better choice, so that you can pull down updates as work continues on the project.
- * do: git://github.com/sam/do.git
- * dm-core: git://github.com/sam/dm-core.git
- * dm-more: git://github.com/sam/dm-more.git
- I'll assume that you're putting all of this stuff into a single common directory, like this:
- mkdir build
- cd build
- git-clone git://github.com/sam/do.git
- ...
- Install Merb
- The current Merb gems available from Rubyforge are stable, and (now that some plugin issues have been settled) should work fine with the bleeding edge DataMapper.
- sudo gem install merb-core
- sudo gem install merb-more
- But, if you want to install edge Merb, too, then you'll need to clone these repositories:
- * merb-core: git://github.com/wycats/merb-core.git
- * merb-more: git://github.com/wycats/merb-more.git
- And build and install the gems from source:
- cd merb-core
- sudo rake gem install
- cd ../merb-more
- sudo rake gem install
- If you want to build the additional Merb stuff from source, that's fine (so you have the bleeding edge), but installing that stuff from Rubyforge gems should work.
- Build DataObjects
- You'll need to build the data_objects gem, and at least one of the database-specific plugins. Don't use do_jdbc yet, as it's still very much a work in progress (so, still no JRuby; sorry). In my case, I picked do_mysql.
- cd do/data_objects
- sudo rake gem install
- cd ../do_mysql
- sudo rake gem install
- (You should probably make sure that the mysql_config command is in your PATH before trying to build the do_mysql gem.)
- Build DataMapper
- More of the same. You shouldn't need to do anything special here.
- cd dm-core
- sudo rake gem install
- cd ../dm-more
- sudo rake gem install
- Create Your Application
- Now it's time to create the Merb application. If you've done this before with the earlier DataMapper, it still works much like you'd expect:
- merb-gen app sample
- cd sample
- Now open up config/init.rb in the application you just generated. Find where the commented-out calls to use_orm are, un-comment the line that says:
- use_orm :datamapper
- Now you're ready to generate your first resource code. This'll take two steps: the first time you try, merb-gen will create a sample database configuration file and halt. After you've edited that with the details of your database, running the command again will succeed.
- merb-gen resource widget
- mv config/database.yml.sample config/database.yml
- nano config/database.yml
- merb-gen resource widget
- Version:
- 3 messages about this page
- May 16 2008 by Max
- Maybe update this page to include sake instructions?
- May 4 2008 by Michael Klishin
- 2008/5/4 dkubb <dan.kubb@gmail.com>:
- People at #merb keep asking about Merb plugin and there's nowhere to
- refer them to ;)
- May 3 2008 by dkubb
- Shouldn't this also provide instructions on installing dm-more/
- merb_datamapper?
- Report this page
- Sign in to discuss
- Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
- ©2008 Google
Add Comment
Please, Sign In to add comment