WebFaction
Community site: login faq

Hi,

I have just signed up for the web faction account to use it for my ROR applications testing and hosting. I followed all steps mentioned in the documentation: http://docs.webfaction.com/software/rails.html?highlight=rails%20generate#

Here is what I did: 1. By default webfaction installed an app "rails" with dir "hello_world" installed having rails 3.2.3 and ruby 1.9.3 installed. 2. Tried loading the app in my domain "talktoari.webfactional.com". I could see the default rails page. 3. Created a new mysql db using web faction control panel 4. Changed my database.yml to reflect those changes in the production section: adapter as mysql2 5. SSH login and ran "rails generate scaffold post title:string body:text". All went fine. 6. Ran "rake db:migrate RAILS_ENV="production" Output: [talktoari@web336 config]$ rake db:migrate RAILS_ENV="production" (in /home/talktoari/webapps/rails/hello_world) == CreatePosts: migrating ==================================================== -- create_table(:posts) -> 0.0251s == CreatePosts: migrated (0.0252s) ===========================================

  1. So I thought that all database and table creation went fine.

  2. I had sqlite3 and mysql2, both gems in my gem file

  3. The development environment rails is working fine with the table in sqlite3

  4. But when I change the nginx.conf and add "rails_env production;", my app does not work with the mysql database and table.

  5. I verified that there is no table created in my mysql database

Please guide me to see my app working fine with production. I am new to web faction and to deployment with mysql

asked 19 Apr '12, 04:18

talktoari
535
accept rate: 0%


Hi,

You should also run:

RAILS_ENV=production bundle exec rake assets:precompile

If the problem is still not resolved after this, please submit a support ticket, so we can take a look at your Rails app and try to determine what's causing the problem.

permanent link

answered 19 Apr '12, 05:51

todork
1.2k5
accept rate: 34%

Thanks a lot Todor. This resolves the problem. Sometimes we miss certain silly things. Of course I will need to precompile my assets.

Thanks for very quick response. marking this as answer

(19 Apr '12, 06:17) talktoari

You are most welcome! I'm glad this resolved the problem for you.

(19 Apr '12, 06:18) todork
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×168
×108
×32
×28

question asked: 19 Apr '12, 04:18

question was seen: 2,959 times

last updated: 19 Apr '12, 06:18

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM