Rails app don't work on passenger after changing database - ruby-on-rails

I got rails app deployed on passanger with apache.
Before app works on local firebird database, after i changed credentials to database server in company but located on another pc i got this error.
An error occurred while starting up the preloader: it did not write a startup response in time.
Raw process output:
(empty)
Error ID
06c3cb78
When i start rails app with this database on my local machine with RAILS_ENV=production rails s it works fine.
Does anybody got this error before and know how to solve this?

That was my mistake. There was error with dns on server, my production server 'don't see database srv'

Related

SocketError in UsuariosController#forgot - getaddrinfo: Name or service not known

I´m running an app in ruby 1.8.7 with rails 3.2.1 using Phusion Passenger version 3.0.7. I did not develop nor deployed this app and I´m really new to Rails. This error comes up when the system is sending the user an email with a password recovery link. This probably started after a migration ( I´ve been told ).
Trying to debug the problem I´ve started the app with 'rails server -b 5.39.95.126 -p 8000' in order to see what it would log into the terminal.
To my surprise this way the app works fine.
Thanks for the help.
My problem was with the configuration of App, the config.action_mailer.smtp_settings was pointing at an inexistent e-mail account.
Thanks

Deploying rails app on Digital Ocean with passenger and NGINX

This is the very first app I am deploying so I'm not 100% familiar with the whole process.
Right now, all my code for the app is on my server, and if i run rails s and bind it to my droplet ip, it shows up perfectly(i.e. if i go to myipaddress:3000).
But, if I just go to myipaddress on my browser, i just get a 500 error page.
I am confused about the whole process, do i have to have my rails s running the whole time when deployed and running on the server?
If not what am I doing wrong and how can i fix it so that it just shows up when I go to my droplet ipaddress?
My nginx.conf file has its server name pointed to my droplet ip and its root pointed at my apps root folder.
Also, im not getting any errors logged into my nginx/log/error.log file
First of all you don't need to start server with rails s.
You just need to install passenger and nginx for start application with installation of ruby on rails.
And if you just want to check your app is running or not then start server with rails s into digitalocean and try to open it with browser with `ip:3000' then it will work.
From this Ref. link you can start with passenger and nginx.
Let me know if you need more help.

Rails still hitting old database IP, even after restarting apache

I have a Rails app on a windows machine that also has a SQLServer that it used to use as it's database.
However I am trying to transition the app to use a new SQL server on a different Windows machine.
The new Machine is reachable (ping)
After changing the database.yml file with the new IP I can go into Rails console and make queries on the new machine.
However, Running the code still queries the local(old) database.
I have restarted apache.
This is driving me nuts. Why is my code still hitting the old configuration? Do I need to restart the machine completely?
Thanks
Just Try printing the TARGET_ENV and the URI that you are targeting in the Ruby code. It will tell you which IP is being hit everytime.

Rails Dev Server not visible on network

Trying to do something very basic and test my Rails app on my phone.
Starting the server with:
rails s
But when accessing mymachinename.local:3000, Mobile Safari says that the server stopped responding after about 30 seconds.
I do this all the time on other machines, but I have no idea what could be causing it here. Any suggestions?
I've had a similar issue before trying to access the server from a virtual machine, I had to use the following format for the rails server command:
rails s -b your.dev.ip.address
Whoops. Firewall. Don't know why I even had it turned on.

how to deploy ruby on rails application in xampp in windows xp?

I'm very new to Ruby environment ..
I want to run my Ruby on rails Application in apache in xampp on windows xp rather than WeBrick server which is in-built for ruby on rails...
I tried it by adding Virtual host in apache- http.conf file
When i run my application i'm able to see "Welcome Abroad"....
But when i click on "About your application’s environment"
it was showing error like the following
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
9/9/2011 10:47:31 AM
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
To deploy your app with apache you need to use phusion passenger http://www.modrails.com
There are plenty of how-to's around the web and the documentation is good enough to get the service running.
This means your Ruby on Rails server is NOT running.
You need to run your server first.
I made a batch file, start-server.bat which contains
d:
cd "D:\Ruby\Web\rails1"
"C:\RailsInstaller\Ruby1.9.3\bin\ruby.exe" script\rails server
then check the PORT number of the server that is running,
So since the port on the screenshot says 10524, you can run it on
http://localhost:10524/

Resources