1

私はシナトラで遊んでいて、オンラインで見つけた簡単なチュートリアルに従っています ( http://carlosgabaldon.com/articles/singing-with-sinatra/ )。

でも入ろうとするたびにDataMapper::Database.setup({...

わかりuninitialized constant DataMapper::Database (NameError)ました..理由はありますか?

4

2 に答える 2

1

Like others said, you should definitely use some newer/better tutorials. The Getting Started page on DataMapper's website is a good starting point, along with the rest of their docs.

To answer your question, this should connect to your database:

DataMapper.setup(:default, 'sqlite://db/my_way_development')
于 2012-02-18T17:38:00.053 に答える