4 ms·
> Ruby, with its runtime, is complex and hard to build and deploy and host. Heroku et al take that away from you, but "getting it running on your laptop" alone
by strzibny 5y ago
> Ruby, with its runtime, is complex and hard to build and deploy and host. Heroku et al take that away from you, but "getting it running on your laptop" alone is a sysyphian task.
Is it? And compared to what? I don't think it's hard at all:
- You can install Ruby from a system manager (super convenient) or with tools like ruby-install+chruby and ruby-build+rbenv. So that's one command or a handful of well documented commands you copy&paste.
(You can use CentOS/RHEL modular packages or Fullstaq Ruby packages for your server to skip the long compilation step.)
- Once you have Ruby, you should install -devel packages for libraries you use (this is same for all dynamic languages that need the C header file for compiling the extension).
(This depends on the application.)
- You make Bundler to install your gems by running "bundle install". If you installed your header files, this step shouldn't stop you.
- You run the Puma app server by "bin/rails s" (in development) or "bundle exec --keep-file-descriptors puma -C config/puma.rb" (in production) while making sure the RAILS_ENV is set properly.
(Puma has a lot of different configurations, but you can do defaults.)
Now you are up and running, and should wrap the above as a systemd service or within a Docker container on production servers. I don't see how this is so much more difficult than other stacks? Python is slightly less convenient I think.
In the Rails demo I made for Deployment from Scratch the Ruby bits are not very long, nor hard.