开发者

Freezing database with Rails application

开发者 https://www.devze.com 2022-12-13 06:27 出处:网络
So for a class I have to turn in my Rails application to my professor. What is the best way to make sure everything开发者_运维知识库 goes smoothly when he trys to start it up? Also, is there anyway I

So for a class I have to turn in my Rails application to my professor. What is the best way to make sure everything开发者_运维知识库 goes smoothly when he trys to start it up? Also, is there anyway I can freeze a database and send that with it so he has all of the data I have been using in the application?

Thanks a lot.


Depending on your needs, the SQLite3 database (used by default in Rails) is stored on the file system in the db directory of your Rails app. So, assuming your professor has the requirements to run Ruby on Rails, the application will start up with the data you've used.


My guess is you have hard coded connection strings in your rails application. Ask your professor what server he will be running it off of. At that point either change the strings to match or create a config file that is read in and can be edited (which is the better choice of the two). Most databases have export functionality which will allow you to export the current information within the database.

0

精彩评论

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