I cant figure out why my rails app is not generating the log file any more. I restarted the web server but still no sign of the log file. What config parameters could possible make it not being generated?
Do you have the folder log? Does the user that runs rails have write permissions on the folder?
Related
I used complete_passenger_mysql recipe and successfully deployed the app.
Last command I saw was, '* 2013-11-10 03:36:59 executingcleanup''`, and then it automatically ended the session, without any error.
So, I guess, deployment was successful.
Now, when I try to browse my app, it just lists files/directories of my app's public directory ( 404.html, 422.html, 500.html , assets folder etc.)
So, I think apache is working fine. But rails server is not live. Do I need to do anything special for that ? I just did cap deploy to deploy the app.
please check the log file on server
deployed_path/current/log/production.log
or you can try this in console of the server
$ RAILS_ENV=production rails c
The db config will make issue if it's wrong.
config/database.yml
I'm new to RoR.
I was able to install Rails and host it in Webrick (Sample App with "Welcome" controller) in my windows.
Now i have a Unix Weblogic Server along with a dedicated domian.
After exporting the .WAR file using Warbler, i accessed the Oracle Admin Console from where i deployed the .WAR file in the dedicated domain. I did all this for the Sample app with only the Welcome controller in it.
But even after deploying the WAR file, on accessing the Domain along with the Port Number (:9002) i ended up with 404 file not found error On looking at the server logs,there wasn't any records relating to any error. The Application must have been deployed properly. I assume that i must have missed out on some basic configurations in the routes.rb or similar files before deploying. Can anyone Guess what are all the possibilities and if possible can anyone help me by pointing to any tuts that cover the Steps to be carried out for configuration before deployment. do i need to install both JRuby and Rails inside the server before depolyment?
I can't really guess with Eror 404 only.
You can try mapping your rails app rack config to a different base_uri.
All you need to do is wrap the existing 'run' command in a map block
try doing this in your rails 'config.ru' file:
map '/mydepartment' do
run Myapp::Application
end
Now when you 'rails server' the app should be at localhost:3000/mydepartment .
Not sure if this will give you the desired outcome, but worth a try.
One more thing you also add this to your config/environments/production.rb and config/environments/development.rb (if on production mode):
config.action_controller.asset_path = proc { |path| "/abc#{path}" }
otherwise when you call your helpers such as stylesheet_link_tag in your views, they will generate links without the "/abc".
Also, find some guides you may refer for good support.
JRubyOnRailsOnBEAWeblogic.
Use JRuby with JMX for Oracle WebLogic Server 11g
Let me know if it is not resolved.
I'm been working on a rails 3.1 app with one other dev.
I've just pulled some of his recent changes, using git. And am now getting a 403 on any page I try to visit.
You don't have permission to access / on this server.
I'm running the site locally through passenger.
Oddly, when I start the app using rails' internal server. I can visit the site at http://0.0.0.0:3000
Looking at the changes in this recent pull, the only files have changed are some javascripts, some html the application.rb, routes.rb and a rake file.
How do I debug this, I'm a bit lost on where to start?
EDIT:
If I roll back to an earlier version the site works, through passenger. Which leads me to believe the problem is within the rails app, rather than an Apache error. Or it could be a permissions thing, can git change file permissions in this way?
IMHO this is a configuration error in Apache or wrong directory layouts. Make sure that the passenger_base_uri still points to the public folder inside your rails project and that there are no hidden .htaccess files which block access. Also verify that your sym-links are correct (if there are any). Also check your Apache error log.
Start by launching your console to see if rails and your app can be loaded.
In your application root directory type :
rails console
I'm trying out a Q&A application written in rails 3.1 on my Ubuntu system. After I run the server (rails server), and enter the localhost:3000 url in the browser, I'm getting the following error:
/var/lib/gems/1.8/gems/jquery-rails-1.0.14/vendor/assets/javascripts/jquery.js isn't in paths:
(...."displays a list of paths including /$home/myapp/jquery-rails/ruby/1.9.1/gems/jquery-rails-1.0.14/vendor/assets/javascripts".....).
I did bundle update and it installed the jquery.js and all other .js files in that last path. But I'm still getting the same error. Any suggestions about what I might be doing wrong here?
P.S. When I enter the URL localhost:3000, it actually tries to open the URL: http://localhost:3000/session/new. Must be some application specific logic.
Remove everything in your /tmp directory and restart the Rails app.
Fixes it for me.
In my rails app, when I first ran it, I got an error that said 'No such file or directory. log/development.log'
When I touched a development.log file, the app ran fine, but the file wasn't being written to by the logger. I tried changing the permissions on it to 666, but it still didn't work.
Possibly the user that is running your app doesn't have write access to the log file.