I’m currently involved in a web development project; having both the roles of the designer as well as the programmer. My search for a lightweight framework I could use on this project has ended, and I’ve decided on using Kohana. Kohana was based on CodeIgniter (CI), which I have been able to play with already, so I’m quite familiar on how it works already.
By viewing the documentation of Kohana, I could say I love it! The way Kohana handles views is perfect, compared with CodeIgniter which I found to be quite limiting. I’m very excited on using this framework on this project, may this be another good learning experience for me. I’ll be posting the progress of this project on every milestone I reach.
I posted a while ago about the problems on DreamHost killing my ruby applications’ start-up. Currently I have a solution, yet it is experimental and certainly not reliable. To tickle the application every 5 minutes, the application processes won’t be idle and won’t be turned off by DreamHost. Since my application don’t get much traffic, I need this desperate measure to keep the application from dying. In return, I can access the applications in an instant as if they wereÂ PHP applications.
My web application is small and lightweight since it uses Sinatra which is a very light framework, so I know it won’t be needing much resources. The starting up is the only problem, since running ruby applications on DreamHost creates a sudden spike on the ram by starting up.
To tickle the application, you need to create a cron job that will visit the application every 5 minutes.
*/5 * * * * /usr/bin/curl http://your-domain.com/ -s -o /dev/null
I noticed some odd behavior though. When you try to run another ruby application on the same server, the loading of my ‘tickled’ applications are also being delayed.
I had this idea a long while ago, and when I saw that this method being used by other ruby users hosted on DreamHost, I decided to try it out too.
While programming for one of my projects using Sinatra, I encountered a problem when using Rack’s session.
LoadError: no such file to load — openssl
The error message states that they cannot find openssl, even though I currently have it installed on my machine. After reading advices from helpful forums, people who encountered the same problem stated that I need the library of OpenSSL. Here’s the code to install the OpenSSL library easily:
sudo apt-get install libopenssl-ruby1.9
I worked for me, and now I can continue working on my project.