I am attempting to deploy my Rails application to the Google App Engine, but thus far unsuccessfully. I have deployed the Ruby development stack following the instructions but that is where they stop, there is nothing on how to actually link my app from localhost and deploy to the AppEngine to view in browser.
There is this question: Ruby on Rails app on Google App Engine answering the problem, but appears greatly outdated.
How can I deploy my Rails App to Google App Engine?
The quickstart link provided by Michael is useful when you are using just Ruby. If you want to use Ruby on Rails, you can follow this tutorial.
If you use Cloud Shell for the deployment, to test if the server is working, specify the port you wish to connect to when you launch it:
bundle exec rails server -p 8080
Follow the steps in the tutorial and you will be able to deploy a Ruby on Rails app on Google App Engine. Then you just have to adapt the steps to your own Rails app and you will be ready to go.
(Jun 2021): This question is still relatively current, but all of the comments and single posted answer are now outdated as the Google Cloud serverless compute platform team formally launched Ruby as a Standard service in Aug 2019. You can find out how to setup, run locally, then deploy globally, a Ruby app to App Engine from its Quickstart page. You can learn more about the Ruby 2.5-2.7 runtime on its platform overview page.
Related
So here what I did and the following output:
root#ubuntu-512mb-sfo1-01:/var/lib/dokku/plugins# dokku postgres:link DATABASE ubuntu-512mb-sfo1-01
2016/02/18 05:24:38 open /var/lib/dokku/plugins/available/pg-plugin/plugin.toml: no such file or directory
2016/02/18 05:24:38 open /var/lib/dokku/plugins/available/pg-plugin/plugin.toml: no such file or directory
no config vars for ubuntu-512mb-sfo1-01
Can someone help me? I try to deploy rails to digital ocean.
I use http://blog.flatironschool.com/using-digital-ocean-and-dokku-for-easier-rails-app-deploys/ - this tutorial but it seems to be horribly outdated. I ran into so many errors so I am thinking of giving this up and staying with heroku hosting.
It means that you don't have a Postgres docker container active. Take a look at the dokku-pg-pluging to know how to configure and instantiate a postgres docker container.
By the way, since your objective is to change from Heroku to DigitalOcean, and you're having trouble using dokku, may I suggest you using deploy bot instead? I did managed to successfully deploy an rails 4 app to DigitalOcean using deploy bot. Follow this tutorial. And you can easily follow this guide with deploy bot, adapting the unicorn and nginx stop/start services with the hooks that deploy bot provides.
Edit:
Since you wanted a more specific answer for the deploy bot solution, here goes my approach (this was +/- 3/4 months ago):
Create the droplet and follow the guide to create a droplet, install ruby, rails, unicorn and nginx and the script to control unicorn (it's in the tutorial).
Configure the deploy bot and make sure you run bundle install and another rails' specific commands (changing environments and so on) after the upload (this is a predefined hook).
The last command should be service nginx restart to restart the server (using the script from step 1).
Profit!
I'm new to Dokku, and got a mature Heroku project running for 3 years, I got this annoying issue that Dokku thinks my rails app is a node app probably because I got the package.json file that I use for client side tests. What should I do (currently I renamed this file to trick Dokku but this is kind of hacky) to tell Dokku I have a rails app? What is the proper buildpack I should specify and how.
You can specify a custom buildpack as noted here.
For your application, you'll probably want to use the ruby buildpack.
I have successively linked my Google Compute Engine console and Bitnami, as well as deployed a Ruby Stack. However, I wish to now move my Rails app onto the Ruby stack, but there is no documentation whatsoever on how to do so.
I am running Rails on Windows right now and therefore cannot use Passenger. Below is the file path of Bitnami Ruby stack, but there is no indication where to place the Rails files:
How can I deploy my Rails app onto Google Compute Engine/Bitnami?
Bitnami developer here,
You can upload files to your Google Cloud Platform instance using a SFTP/SCP client. You can find more information about that our wiki entry at https://wiki.bitnami.com/Google_Cloud_Platform/Servers#How_to_upload_files_to_the_server_with_SFTP.3f
Also, to deploy your custom Ruby on Rails application in your Bitnami Ruby Stack I recommend you to follow our guide at https://wiki.bitnami.com/Applications/Bitnami_Custom_Ruby_on_Rails_application that will show you how to add your own Ruby on Rails application on top of the Bitnami Ruby Stack the same way as other Ruby on Rails applications are installed in Bitnami.
Best regards,
Gonzalo
The Developers Console provides Ruby Stack under Click-to-Deploy menu.
The idea is to find an easy solution to distribute a rails application with dependencies (redis, database, apache etc)
It seems that Github does a good job on this, see github-enterprise-faq. The idea is to pack the rails app as an VMware to hide the code and mount it to the network.
Does anybody have experience with that approach?
similar to, but old:
2012 Distribute Ruby on Rails app
2008 Can you Distribute a Ruby on Rails Application without Source?
Options for distribution of an offline Ruby on Rails application
Vagrant and Chef are exactly what you're after.
I am in the process of learning Ruby on Rails and things have been going smoothly - up until I tried to deploy one of my test applications to my shared hosting account.
I use Host Gator and was able to successfully create a new Ruby on Rails app via cPanel and run it. The only problem is that when you create a new app this way, it populates its directory with a blank application - as would rails new app_name locally. When I delete the files and folders in this directory and replace them with my own, then attempt to run the app, cPanel says that it is running on the confirmation page but it never actually starts. I am not receiving any error messages either.
The host seemed rather stumped, stating that it should be a matter of deleting the initial files and folders and replacing them, then running. The app works fine locally so I do not think that it is a code issue. In my research I came across Passenger, although it is way over my head and it would appear that you really need to have total control over Apache to make it all work, including ssh.
If it makes any difference, the apps I made locally were put together using an installation of Rails Installer and are scaffolded. For testing I am using a bare minimum app with about three fields in the table.
What am I missing? Any help would be appreciated.
Maximum supported versions on 26/10/2013 are:
Ruby 1.8.7
RubyGems 1.8.25
Rails 2.3.18
Anything newer than that is a near guaranteed breakage and cPanel & WHM will be incapable of utilizing it in any way, shape, or form.
We can assist you with removing your existing Ruby on Rails installations and reverting them back to cPanel supported and sanctioned versions (Ruby 1.8, RubyGems 1.8, and Rails 2). That is the only thing we can do for you at this time.
If you want to use any versions newer than this, then you will be unable to use the cPanel & WHM interfaces or management tools for it -- they simply will not work. You will then have to manually manage your RoR install by yourself through command line exclusively. None of it would fall under the scope of cPanel support.
You can use http://ndeploy.in which is a third party plugin to integrate Rails Hosting via Phsuion Passenger in cPanel .
Just to let others who is using Cpanel with rails know.
I was able to use Cpanel to create a rails app, start it, and do the redirection all within Cpanel.
Nothing to modify or change. Quite straightforward for me.
So I guess it would be easier to do the development work straight on the server itself.
Have not tried to deploy a locally developed rails to shared server, or any per se. But I'm guessing we could create rails with Cpanel and replace the files in the directory generated.