How to deploy rails app on godaddy server - ruby-on-rails

I bought a godaddy server, I want to deploy my rails app on it using Apache + Passenger + Capistrano.
However, it seems I can't install passenger in my server.
After I connect to my server using ssh and type 'sudo gem install passenger', it says sudo is an unknown command..
So can anyone tell me how to deploy rails app on a godaddy server?...

It depends on the Linux distribution you have installed on your machine, in order to log in as superuser you can try "sudo su" or simply "su".
Obviously you need to have the superuser password.

By default Go Daddy servers have a user you set with a password. To gain root access you will type:
su -
You will then enter the same password you logged in with originally. By default the user and root passwords are the same.

Related

Access root files with puma in development

When accessing my ssl certs with nginx from /etc/ssl/, everything works fine. But when I run rails development server (puma) as the normal user, it can't access the key in /etc/ssl/private/ because of permissions.
How can I access /etc/ssl/private from the rails server? Do I need to add my user to a group or run the server with a different command?

Rails on digital ocean. Show logs

I have installed rails on digital ocean on ubuntu 16.04 as production server. Now I'm trying to run the app on browser but there's some error.
How can I check the logs?
ssh into the digital ocean server using the IP address and password
cd into the folder where your app is installed. If you do not know where it is installed, use locate <appname>
you can find the logs in log/production.log. If you run your app using a different environment than production, then your log file name will be log/<environment>.log

Deploying Rails with Dokku - Dokku#Dokku.me Password?

Im deploying a rails app to a digitalocean server with these steps.
http://dokku.viewdocs.io/dokku/application-deployment/
problem is when i get to the Deploy App section it says
Now you can deploy the ruby-rails-sample app to your Dokku server. All you have to do is add a remote to name the app. Applications are created on-the-fly on the Dokku server.
git remote add dokku dokku#dokku.me:ruby-rails-sample
git push dokku master
When i enter that its asking to enter dokku:dokku.me password.
Does anyone know why or what is the default password for this? No mention of dokku.me before this step.
We don't set a password on the user, so this is likely your ssh key's password.
dokku.me is a placeholder for the documentation. Replace it with your digital ocean droplet hostname
I solved the mine by typing this command in my terminal
cat ~/.ssh/id_rsa.pub | ssh root#serverIp "sudo sshcommand acl-add
dokku laptop"
after type your password and you can try again to deploy

Switching Between Heroku's Remote Repos

I'm facing a curious problem.
I'm running a Linux box, with two Desktops. Here's my environment:
Desktop 1: Running a pet project
Terminal 1
Heroku Login: my personal e-mail
Heroku App 1
Desktop 2: Running a real project
Terminal 2
Heroku Login:same as above: my personal e-mail
Heroku App 2
When I switch from Desktop 1 to Desktop 2, from my pet project to the real project, surprise! Terminal 2 is connected in Heroku App 1!
How can I fix this, keeping separate environments, properly switching between two Heroku's environments?
Thanks in advance.
You should use the Heroku Accounts cli plugin.
$ heroku plugins:install git://github.com/ddollar/heroku-accounts.git
$ heroku accounts:add personal
Enter your Heroku credentials.
Email: david#heroku.com
Password: ******
Add the following to your ~/.ssh/config
Host heroku.personal
HostName heroku.com
IdentityFile /PATH/TO/PRIVATE/KEY
IdentitiesOnly yes

Capistrano forward_agent

I'm trying to deploy my app from a remote git repo with capistrano. Everything was working fine till I installed ssl certificate on my server. Now the problem is when capistrano restarts the apache server the server asks for the passphrase. My question is how can I enter that passphrase from my local machine. I have enabled forward_agent by using this line but its not working.
set :ssh_options, { :forward_agent => true }
I was wondering if there is any other way to enter value on server from your local system.
Agent forwarding is for ssh keys, on apache restart most probably it's the sudo asking for password.
Add the deploy user to sudoers to allow apache restart, for example
deployer ALL=(ALL) NOPASSWD:/etc/init.d/apache2 restart

Resources