开发者

Is it possible to run a SQL-only file from a "rake db:create"?

I'm trying to install a software called Teambox in my Dreamhost shared account, following these instructions.

I have no experience with Rails. I just want开发者_如何学Python to install the software in the shared hosting.

In this shared hosting, all dependencies are ok, but I have to create the dabatase from their panel. I can't create in command line (ssh).

So, when I run "rake db:create" these's an error, because the db already exists (because I created in panel).

I've already contacted support. They can't change this policy.

How do I populate my tables "by hand" in this case? Which files should I look inside Teambox's folder...

Thanks!


rake db:create should create your database and that's all. It doesn't creates your tables.
There are several rake tasks to do that :

  • rake db:migrate which will execute your migrations. So create all your tables.
  • rake db:seed which will add the original data of your application. See Database Seeding

You don't need to be able to create the database to do any of these.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜