Articles tagged 'ruby'
Upgrading any legacy application is a headache. You are trying to pay a technical debt of years in a couple of weeks or months. It isn't easy, but it is also the best time to get things right for the next time you need to do an upgrade. In this short...
Read More...
In our scripts, we present information to our users via the two standard output streams: standard output and standard error. In this post, I’ll explain why it is useful to distinguish between standard output and standard error, and share tips on how...
Read More...
One of the most common mistakes I see in ruby scripts is the lack of good exit status, this prevents the script from being trusted in composition with other commands. The purpose of this post is to explain why exit codes are important and how to use...
Read More...
When we build Ruby scripts, generally, we build them to be run independently but being able to compose them with other scripts makes them even better. How can we make our Ruby scripts be easy to compose? This is what this post is about, I will show...
Read More...
Ruby excels in its simplicity. It allows programmers to go from idea to implementation in a short time without much overhead. While many programmers have only heard of Ruby in relation to the web framework Rails, the scripting side of Ruby is very...
Read More...
Thor is a toolkit that can help us build command line interfaces(CLIs). You can find many tutorials on how to build a basic CLI using Thor. I want to explain the default behaviour of Thor and also when to use env
to define the binary that will run...
Read More...
Update 2018-08-27
I ran into a problem with Rails, it couldn't find a database.yml
, this was not because of a Rails missconfiguration but because of the binstub for rails had:
1
|
APP_PATH = File.expand_path('../../test/dummy/config/application', __FILE__ |
Read More...
When we use:
1
|
bundle update specific_gem
|
We expect to only update one gem the one we are telling bundler to update but that is not the case it updates the gem and all its dependencies, and if the dependencies have updates but the gem doesn't the dependencies...
Read More...
I prefer to keep all my gems separated by project so I use rbenv-gemset you might want to do that too.
If you want to use a specific ruby version on a project do the following:
1
2
|
cd project
rbenv install 2.4.1 # you can pick any version `rbenv install... |
Read More...