views:

469

answers:

1

Hello I am trying to setup a Padrino project using DataMapper and MySQL on my Mac OSX Snow Leopard.

I have the necessary gems: dm-core data_objects do_mysql mysql (linked to my original Mac OSX installation)

But when I try to start the padrino with PADRINO START from the console, I get the following error:

/Users/ivolution/.bundle/ruby/1.9.1/gems/dm-core-0.10.2/lib/dm-core/adapters/mysql_adapter.rb:3:in `require': no such file to load -- do_mysql (LoadError)

But as I said I do have do_mysql gem installed so there shouldn't be such error, I did bundle install in my project folder before trying to start Padrino.

Any ideas?

+3  A: 

The key is probably in the Gemfile. It is not about what is installed but instead what is declared in your bundler Gemfile. Go into ./Gemfile and declare the do_mysql gem required and it will probably solve the issue.

Something like: gem 'do_mysql' should do the trick

Nathan
@Nathan I was thinking about that, but couldn't find the Gemfile which the bundle install uses. Then I looked again and it was going to pop my eyes as the Gemfile is located in the root of the project. Is there a way form the padrino-gen project to specify that you are using DataMapper with MySQL, it wasn't mentioned in the documentation.
Ivo Sabev
Btw I just realized you are Nathan from the Padrino project, congrats for the great framework. I am just starting to play around and dig deeper in its beauty!
Ivo Sabev
Glad you like the framework Ivo! Let us know if you have any suggestions or feedback as you continue to use it. Also if you deploy any padrino apps into production we would love to hear about it.As far as specifying 'mysql', right now Padrino doesn't go as far as to allow you to specify the specific database adapter (mysql, postgres, sqlite) ala:`padrino-gen project test -a mysql -d datamapper`I will add an issue to track this on the github project. Perhaps one of us or someone else can add in this feature.
Nathan