Open and View the Source Code of a Gem
Now this is a small blog post, issued in interest of the beginners. On how to open and video the code of a ruby gem you are using.
Now this is a small blog post, issued in interest of the beginners. On how to open and video the code of a ruby gem you are using.
Due to some unfortunate events
I faced a common problem for many people “No alarm to wake me up in the morning”. Like every single man, I love sleeping. So unless an alarm or person wakes me up, I will continue to enjoy sleeping - until the urge from my second passion (hunger) wakes me up.
Despite the fact that I love sleeping, my team mates at Ruby Kitchen, won’t be happy with me coming late to work. Challenged with such a problem, I did what every computer hacker would do.
Wrote a program to wake me up, at 6:00 AM 😁
Lot of people might have a confusing between the functionality of update_attribute and update_attributes. The purpose of these functions can be understood from their name itself. the first one update_attribute would update a single attribute of the model
To run a ruby program we use the command ruby
ruby program_name.rb
.
Ruby being an interpreter style language, each line is interpreted(read) one after the other and executable object code file is created for reuse like in case of compiler languages C, C++, etc.. To run a ruby code you need a ruby interpreter installed in your system.
Recently lot of people have been asking me why they are not able to install the pg (PostgreSQL) gem even after installing PostgreSQL server in their system?
Well the answer is simple, the pg gem, requires the PostgreSQL development libraries to build native extensions to communicate with the PostgreSQL server. Native extensions refer to building ruby extensions or wrappers for existing C or C++ library.
One can install the development libraries of PostgreSQL by installing the libpg-dev package.