Ruby 2.2.4 on Openshift Online without Docker - ruby

I'm using Openshift Online (bronze) to host a rails app and I'd like to upgrade from the standard Ruby 2.0 cartridge to Ruby 2.2.4 so that I can run Rails 5.
I tried following this tutorial Using Openshift S2I docker images to build ruby application containers but it leaves me with a gazillion other things to do (I'm a Docker noob), and plus it's quite a jump to go from using a ready-made Openshift cartidge that takes 10 seconds to provision, to building my own Docker container and doing a ton of other stuff I know nothing about.
Does anyone know of a simple way to get Ruby 2.2 onto my Openshift Online gear or is Docker the only way to go?
Failing that, do any Openshift Online contributers who use this site know if Ruby 2.2.4 will be made available as a default cartridge anytime soon so that we don't have to take such an enormous technical leap to get a Rails 5 app running on Openshift Online?

Related

Deploy ruby on rails application built on windows

I'm looking on ways to deploy a ruby on rails 4 app built on windows 7 box. I'm looking to use Heroku at the moment.
Can you please provide any pointers regarding heroku or any other easier and cheaper deployment options available out there..
Any issues That I may face due to the difference in OS in the dev environment (windows) and the deployment environment (linux on heroku)?
This is my first professional app, so any pointers will be helpful for now and also for future applications that I may work on.
Also what is the more preferred OS for ruby on rails development ?
Thanks in Advance!
You probably won't face any issues with deployment on Heroku. Heroku is the easiest option out there (albeit one of the priciest once you're off the free tier)
What's more likely to happen on Windows is that you'll find it hard to build certain gems for development, and cutting edge releases will probably not work well.
Much better to pick up a Linux distro for this.
You can also check out bluemix , which is also free for small projects. I know Heroku is not particularly windows friendly, not sure if bluemix is any better in that reguard, but it is extremely easy to deploy to.
Heroku has set of tools called heroku toolbelt, that makes easy to deploy apps to heroku. you can download heroku tool belt for windows from here
Generally you should be able to port any rails app you develop in windows to Linux/Mac, how ever since the ruby/rails community is largely built around Linux/Mac, responses/options to your issues regarding the rails apps will be low. and there are some gems which doesn't work on windows at all. So its best to move to either Mac/Linux if you are planing to continue on rails.
Once you come to Linux/mac world there are lots of providers much cheaper than heroku like DigitelOcean, however heroku would be the easiest for a beginner I believe.
HTH
One strategy you could try is to do the following:
Set up a VirtualBox or VMWare VM running Linux (Ubuntu would be a good candidate if you are not used to Linux).
Get your project into the VM and get the bundle install and everything working in Linux, you will probably find you need to make some changes in your Gemfile if you have anything windows specific there.
Install the Heroku tool-belt on the Linux VM and install to Heroku from there.
Taking the Windows / Linux transition pain on your local machine will make it much easier than Windows direct to Heroku.

installing firefox for OpenShift DIY cartridge

I need to scrap websites with python (selenium) so i need to install Firefox or chrome or ... .
with openshift servers how could i install Firefox in an OpenShift DIY cartridge?
Thanks a lot.
Since there is no xwindows system installed on OpenShift, I dont' think that firefox will be able to either 1.) be installed or 2.) run on the platform.
You would be better off using something like the nokogiri gem with Ruby, or a python/php library for scraping web content. You might also consider doing the scraping on your own computer, then upload the information that is needed by your website if you HAVE to go the firefox/chrome route.
There are instructions for running Selenium tests in Firefox on a headless server on the OpenShift blog.
https://blog.openshift.com/selenium-ruby-jenkins/

How to Deploy a jRuby App?

Just wondering if anyone has any experience on how to "deploy" a JRuby application to another server?
That is I am developing a jRuby Application on Windows, and I want to eventually deploy it to a host of Linux/Unix Servers. So specifically -
How easy is it too deploy or just a nightmare?
Would I have to recompile all the "gems" (dependencies) or try figure out a way to bundle them as a deploy package? Or would I have to configure jRuby individually per server as I did on my Dev Machine (Windows Box)
PS. The App is made up of Client/Server.
Thanks
Consider using trinidad or warbler; it wraps up most of these issues.

RoR Setting Windows environment

I'm a rails developer and I always programmed on linux environment using Netbeans and RVM.
I would like to try a migration on windows using the IDE rubymine that I've already downloaded. Is there any tutorial or instructions to set up the environment for people like me that are approaching on Windows in Rails for the very first time? (installing ruby the gems etc ? ).
There's a section on Windows instalation in the excellent Rails Tutorial
I also found this blog entry that walks you the process step-by-step
When installing on Windows myself I used this video tutorial from Tekpub, but you'll need to pay to access it.
I recommend you http://rubyinstaller.org/ or http://www.railsinstaller.org/
I did it on my machine and everything works fine, you can add later pik (a multi ruby manager)

Setting up dev server for Ruby

I want to make a development server for Ruby. (I have done this for IIS and a LAMP set up, but am by no means proficient at it.) What will I need besides the actual server (which I already have)? And also any security issues? I know I could dev locally on my machine, but don't want to do that.
First off when doing ruby development the first thing to know is that it works best in a unix like environment, so mac os x, linux, solaris, bsd, etc...
Ruby libraries are distributed and packaged as gems. So you'll want to install ruby and install rubygems. Then from there on you use the gem command for installing ruby libraries.
I'm going to assume you're talking about doing web development with either ruby on rails 2.x or Merb 1.x. The two frameworks are merging in the next release and it'll be called Rails 3.0. So the answer here works for either one. I'm going to say Rails, but i mean Rails/Merb.
Rails development is done locally on your machine. So you'll need to install ruby and all the libraries you need locally. I know many people who use Windows end up using virtualization and running a linux environment for rails within their desktop windows box.
In development most people use an application server, Mongrel. In production the current standard is to use Apache 2 and Passenger.
With rails you're going to want to use source control. Most people today use git in the rails community, but it's possible to use subversion, perforce, or many other SCM's. To get your application from your source control to your staging and production systems, the rails community created an application called Capistrano. It handles deployments. You setup your server information, ssh keys, define access, and then you can release your application with a single command.
cap deploy
It's a pretty good system. Back several years ago now when i was working on odeo.com we had people using windows, linux, and mac's all for development with production deploys to debian linux. It wasn't intentional that our application be cross platform, it just worked out that way because we had people who wanted to add to it, including designers and biz types, who were on windows.
I highly recommend you check out http://guides.rubyonrails.com for more information.

Resources