By m73mitchell
I used to deploy to Heroku but recently joined DO. I got up and running here with the help of Ryan Bates Railscast on deploying to a VPS, but there are some things he doesn’t cover.
I ran “rails console” in the directory of my app and it gave me a menu of options, such as ‘rails new’ but there was no option to run the rails console
3.Environment variables. I need to set Environment Variables for various services that require them (such as email services like Mandrill). How do I set them on DO
(See full trace by running task with --trace)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Assuming you’re on Rails 4, have you tried:
# Feel free to add this line to e.g. ~/.bashrc so you don't have to type it all the time.
export RAILS_ENV=production
bin/rails console
bin/rake db:version
and so on?
The rails in your path may be different from the one used by your app; bin/rails should get you the right one.
when you say you’re in your “app” directory what does it look like, what subfolders, to make sure it’s the right directory… <br>if you want to set environment variables I’d probably set them globally, like in /etc/profile file. HTH.
in home/username I created a new directory ‘app’ where the rails app is stored (and where I might store others), so now I have home/username/app. How do I set them in that /etc/profile file? <br> <br>Would I for example just do this at the bottom of the file? <br> <br>GMAIL_USERNAME=‘me@gmail.com’ <br> <br> <br>Do you have any idea about the other questions, how to seed data or run the rails console? running the console on a remote server is very handy, as it lets you alter and view production data etc
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.