I've long been a user of sqlite3 (with rails) and I never got a chance to try mysql, until now. I need to configure to use it along with Datamapper. Following the tutorial I need to install the dm-mysql-adapter using this command:
sudo apt-get install libmysqlclient-dev My .rb file contains the following code:
require 'data_mapper' DataMapper.setup(:default, "mysql://user:password@hostname/database") class Post include DataMapper::Resource property :id , Serial property :title , String property :body , Text property :created_at , DateTime end Which doesn't run and gives me the following error:
in `require': no such file to load -- dm-mysql-adapter (LoadError) I believe, I need to set up a username and password to get mysql up and running and then establish a connection with Datamapper. Can someone please guide me.
Thanks a lot!
dm-mysql-adaptervia gem.development.dbdoesn't tell you anything. Grab any mysql client (the simplest one is probablymysqlon the command line) and do some introspection.