Should I Deploy a Ruby on Rails Application on Heroku

A little bit about yourself. I am 24 years old, last year I graduated from NC State with a master's degree in analytics. Statistics, math, such things. I do not have a strong programming background, which is very important for my question. If I say something that makes no sense, that’s why. Ever since I graduated, I have been working full time in the Rails application with several other people. My programming experience is mostly Ruby on Rails (1.2 years.) I know R, SAS (statistical languages, not useful for this question.)

Obviously, this means that more than a year has passed in development, and we have not finished yet. The main developer is an excellent programmer, he just has a full time, and he does this application in his spare time. Due to the fact that he did not have enough time, I received full responsibility for the application.

Now we deployed it to Slicehost. The application is at a point where we do not need to program anything (unless we think about additional features.) The reason I ask if we should switch to Heroku is because it seems to me that Heroku is a simple platform, to which to deploy. Slicehost seems too complicated for me. Another developer did it, not me. I looked at how to deploy the application to Heroku, and it looks like I can do it. We need our application for scaling, if necessary, which Heroku offers. As for money, I would start it at least (for free) and see how it happens. I can pay for additional features if I need to.

We use Redmine for project management and storage (not git, which I think we need to use on Heroku.) Is git like Redmine? Is it easy to use?

Right now, at Slicehost, we have 4 daemons (constantly running processes.) We have 8 delayed_job employees. I know the command line to start the daemons and workers delayed_job. Will these works work on Geroku?

I am wondering if I can use RAILS_ENV = production script / console with Heroku.

The user interface is a javascript file. In development mode, if I make a script / server in the terminal and go to http: // localhost: 3000 in the browser, I can see it. Will Heroku load this page the way I want?

We have a working site for an application with our own domain name. I really don't know what DNS is, so I probably won't be able to associate the Heroku application with it unless there is an easy way. I think Heroku associates it with appname.heroku.com by default.

Based on my programming experience, will Heroku be easy enough for me to use, should I find another job or should I do seppuku?

+8
git ruby ruby-on-rails deployment heroku
Aug 17 2018-11-17T00:
source share
5 answers

Yes, you must definitely deploy your application to heroku. To do this, you will need:

  • Make sure git is installed on your computer.
  • Create a heroku account here
  • Install the hero to the hero and do the rest as indicated on this page
  • Track your application with git and create a heroku application as shown here
  • After that, the hero will provide you with the URL of your application, for example http://blah-bleep-123.heroku.com . Now the next step is to link your domain with this heroku URL.
  • Configure your domain’s DNS server as shown on this page . Keep in mind that after you change your DNS, it may take up to 48 hours to work. You can change the DNS domain by going to the site where you bought your domain, for example. godaddy.com, hostingdude.com etc.
  • Add this code to your ApplicationController. You can follow him from on this page.

    class ApplicationController before_filter :ensure_domain APP_DOMAIN = 'www.mydomain.com' def ensure_domain if request.env['HTTP_HOST'] != APP_DOMAIN # HTTP 301 is a "permanent" redirect redirect_to "http://#{APP_DOMAIN}", :status => 301 end end end 
  • Make sure you transfer your entire database to the hero by running heroku rake db:migrate
  • After you complete all these steps, you should be good. Check your domain URL, everything should work beautifully :).
  • If you see errors on your page, you can view heroku logs
  • You can access the console as heroku console

Features like heroku are very convenient to use.

Please let me know if you need further assistance.

+5
Aug 17 2018-11-18T00:
source share

It seems to me that you should seriously think about Geroku. I used it for weekend projects, and we also use it at work, quite successfully. Deployment is a breeze; you don’t have to worry about configuration (for the most part) and system administration. It is super easy to add modules and pay as you grow.

As for your needs, you can (I suppose) run your redmine on Heroku itself, as a rail application. The only thing you mention is that you use Redmine as a “repository,” and I'm not sure I understand what you mean, since Redmine is not a version control system. Redmine has integration points for various VCS (SVN, git, Mercurial, CVS, etc.). Yes, Heroku uses git, and this is what you will need to use to direct the code to the server. If you are familiar with Mercurial, this is pretty similar.

For deferred jobs, Heroku offers free cron jobs that run once a day and hourly for a fee (see cron add-on ). There is also a slowed-down plugin ( see This ), but I have no experience with it.

You must have access to the Rails console ( see heroku documentation ). Just run the "heroku" console and voila, you're there.

If your application works by running script / server, it should also work out of the box in heroku.

As for DNS, it is not difficult to make it work with your user domain. Out of the box, you can access your application using appname.heroku.com to configure your own heroku docs domain check here , but basically you need to add a custom domain add-on (free if you don't want subdomains), configure heroku to respond to your domain requests (a couple of simple commands) and install a DNS provider to indicate Heroku (there’s even a short video in the documents on how to do this with GoDaddy).

The only drawback that I saw with Heroku, and this is not enormous, is that if your application does not receive any traffic for a long period of time, instances of the type "go to sleep", making the next one, ask to come a bit slower (sometimes even out), but as soon as the instance is awake, everything goes well.

In general, I think that Heroku is a great way to remove a ton of the burden from you as a developer and do a lot of things that can be easily implemented without having to delve into the server setup. Drawback: as soon as you start to grow, it can become somewhat expensive, but hey, if you grow up, it probably means that you now have money to hire someone who can take care of nothingness.

You can also take a look at this blog post comparing Slicehost and Heroku

Best of lucks

+3
Aug 17 '11 at 18:19
source share

YES, go for it.

If you still control the power of your “programming experience,” then everything will be all right. Have some confidence and ship something! To quote Paul Graham :

The reason for a quick launch is not so much that it is critical that your product enter the market earlier, but because you actually did not start working on it until you launched it. Startup teaches you what you were supposed to build. Until you know that you are wasting your time. Thus, the main value of what you launch is a pretext for attracting users.

The functionality you plan is easy to replicate and well documented , and you can start from the beginning. What more could you ask for?

+3
Aug 17 '11 at 10:14
source share

If you have free time, you can also register for a free account and take a picture.

HOWEVER, this will be associated with fairly severe headaches.

Version control will be one, since heroku uses git, but another one that nobody mentioned is that your 12 processes (“dynos” in heroku say) will cost you $ 35 * 11 = $ 385 per month! You can set up a $ 3 monthly cron per month that will align your delayed_job queue (instead of constantly working with workers), but will it be adequate? (If you work with 8 workers, I assume not). This may or may not require any code changes.

Once you set it up, deployment and administration is really simple (nonexistent), but it will cost you if you start to need new features.

+1
Aug 18 2018-11-11T00:
source share

YES, go for it.

A good deployment environment is quick and easy scaling and scaling. even you can use for your testing or demo use, this gives you free use of an account with 1 speaker per application.

A list of additional tools that you can add to suit your requirements.

+1
Dec 30 '14 at 9:08
source share



All Articles