I've just recently checked out a code, and everything seems fine, but after I decided to test the production environment via rails server -e production I notice there is no logs/production.log created, I thought it was some permission error so I deleted the development.log but it is able to recreate it but not with production.log
I'm on rails 3.2.13 by the way and I've tried updating all the way to rails 3.2.2 and my app is still unable to create a produciton.log
It does write a log if i touch log/production.log but it doesn't seem to be able to create a log from scratch.
Related
So I am using rails with puma and nginx as my reverse proxy and server for a rails API server.
Every time I make an update on my files , such as updating the model , or controller. I've discovered that my files weren't updating on to production. Discovering this, I found out that I had to restart my puma and nginx each time i made a change.
After i restart both puma and nginx , i see that my APi server looks updated. So i decided to check the console through "rails c production" and I discovered that it couldn't load any of the models and would just keep returning me
NameError: uninitialized constant Post
from (irb):1
Fiddling restarting my servers back and forth , or maybe a period of time , it would magically work on it's own and my files would be updated. Could someone explain to me how do I update my rails production server ? and why is this happening.
I am trying to deploy a Rails application created from Windows (Win 7) to Heroku. Unfortunately, I am experiencing an error in Heroku saying that No such file or directory found when referring to Ruby.
I updated the first line of bin/bundle, bin/rails and bin/rake from #!/usr/bin/env ruby.exe to #!/usr/bin/env ruby but it still did not work out. I then modified this line to #!/usr/local/bin/ruby but still got the same problem.
What are the steps involved to solve this issue please or Windows is a no-go for RoR?
The application is very simple and so far it does not use a database (not even sqlite3)
I've tried those 3 hosting approaches for my Rails app, and no matter what I do, I can't get consistant logging when I run in the production environment.
For my tests, I created a blank app and tried to access the root directory. I would then add a users scaffold and rake the database.
If I turn RAILS_ENV to development, the log/devlopment.log works just fine, logging everything that I would expect.
When I turn RAILS_ENV to production, the log/production.log logs in a strange manner. In Passenger, I get the first routing error. Then nothing. When I restarted apache or nginx, I would get all the routing errors that I had caused since the first (logged) one, then the log would fail to write anything new until I restarted the underlying server. apache2/error.log would get logged to if I had a configuration issue. Then it only logged cache misses
With Thin and Unicorn, I only get errors about the static assets (I did not precompile the assets). Once I precompiled the assets, no more log messages appeared.
On all 3 setups, I would get precompilation messages (when I ran assets:precompile) in production.log (indicating that Rails could at least write to the log).
Does anyone have a Rails 3.2.1 app that is running on one of the deployment gems (Passenger, Thin, or Unicorn), that is logging correctly in production mode? I've spent 5 days working on this. I'm out of ideas.
Turns out its a reported issue in Rails 3.2.x. A fix has been submitted and will hopefully be released with Rails 3.2.2.
https://github.com/rails/rails/issues/4277
I am running Apache2 with Passenger and Rails. I am able to run my web app with 'rails s -e production' but Passenger will not run the app. It just gives the 500 error. The log is giving me the whole precompile error, but changing the config to precompile or 'rake assets:precompile:all' do nothing. I am working with an existing SQL database and it sometimes also gives a table not found error when running behind Apache, but works just fine in WEBRick. I have a "RailsEnv production" directive which did nothing either. I do not understand why it would not work with Passenger but with WEBRick, especially when I got it working with Apache before, then simply redeployed the app in a different directory and got these issues. There is also a cache: get miss error but I resolved it I believe, but my app still does not work. I have been working on it all day yesterday and today and still can not get the app to run with Apache. Already tried permissions, already tried reinstall, already tried db:migrate, already tried everything. Does anyone know why it is failing?
This is my first stab at Ruby on Rails. Just deployed a very simple app to Heroku.
The thing is that my app runs flawlessly on mongrel development; When I run it with "mongrel_rails start -e production" however, I get the error "We're sorry, but something went wrong."
For the life of me, I couldn't debug this. Heroku logs is not returning anything, the Exceptional addon in Heroku is not returning anything, and I cannot find mongrel.log on my Windows machine (when I run mongrel using: mongrel_rails start -e production -d"
I'm using Rails 2.3.5 and sqlite3 with bundler to pack my gems.
I was told that probably rails is not booting up correctly. I can't find any other way to diagnose this. Any ideas?
Thanks,
ANaimi
Take a look at your log/production.log file. That should contain detailed information about what's going on. It will usually contain a line that specifies the name of a gem that needs to be installed.
Heroku doesn't use mongrel, so I'm assuming that's what you're trying to do to figure out why it isn't working when you push it to heroku.
I've found, in most cases, my heroku problems have been because of uninstalled gems. Make sure you create a gem manifest.
Try tailing logs while booting up. From the terminal in the log directory do: tail -f *.log and then launch the app from another terminal (likely it's development.log since you're probably running in development mode.)
Not sure if this got definitively answered, however, check your '%app_root%/config/environments/' folder, and compare 'development.rb' to 'production.rb'.
Make sure that you have all necessary settings in the production.rb file - might have missed something important there.