Archive for 'gem'

rails server fails to start – bin/rails:6: warning: previous definition of APP_PATH was here

If rails server fails to start for you due to APP_PATH issue below: I was able to fix the above issue in two ways: You can either comment out the spring gem or do the following instead, which I recommend: From within your project directory, do the following: Do the following at your own risk!!! […]

Incorrect MySQL client library version! This gem was compiled for 5.6.21 but the client library is 10.0.14-MariaDB

If you get the following error, you probably have to reinstall your mysql2 gem by specifying the location of your MariaDB or MySQL installation. The Error: Uninstall existing mysql2 gem: Install mysql2 gem again: If you still see issues: Here is the error you might see: Uninstall existing mysql2 gem: Install mysql2 gem again: The […]

Is web-console one of the most useful gems in Rails 4.2?

Rails 4.2 will be the web-console gem included in it and I can see this being one of the most important features added to the framework since it can help Rails developers become even more efficient when developing new features as well as debugging bugs. The Rails console is embedded in your loaded browser page […]

Log to your JavaScript Console from Ruby

You can log to your JavaScript console from Ruby with https://github.com/ConradIrwin/console.log What problems has it solved for you?

Bundle Install – missing mysql.h

If you’re seeing the following error: The way I was able to resolve it was to follow Boonedocks.net, since I’m also using MAMP for its MySQL Database instance. The only difference is that I already had MAMP 1.9.4 installed and so I had to download the MAMP_components_1.9.dmg which contains the mysql-5.1.44 source code. MAMP 1.9.4 […]

Deploy to EC2 with Rubber on Rails 3

Rubber is a gem which makes it easy to make multi-instance deployments of your rails app to EC2. It uses capistrano to do this. Before proceeding, make sure you have your EC2 account created and have a keypair set up with Amazon. Here is recipe of what I’ve done so far. I’m running into issues […]

Easily Replace Prototype and Scriptaculous with JQuery

There is a very cool gem called jquery-rails which provides you one rails generator which will replace your Prototype and Scriptaculous JavaScript libraries with JQuery, within your Rails app. It will download JQuery and install it for you under your public/javascripts directory. I believe this gem only works with Rails 3. I’ve only tested it […]

Building a Simple Addressbook with Authentication using Devise

Assumptions: You are using Rails 3, even though I tried to accomodate Rails 2 as well. In this Tutorial / Recipe, l go through creating a very simple “Addressbook” with Devise as its Authentication system. This Addressbook only contains two fields name and phone. A User model is generated with authentication using the Devise gem. […]

Authlogic vs Devise for Authentication in Rails

The following post has been written by Brian Morearty. Here he compares Authlogic to Devise. I’m posting the following with his permission. "Here’s my comparison. Please keep in mind this is after only having used Authlogic for a few months (I used it on another project) and Devise for a few hours: Authlogic and Devise […]

Wym_Editor (WYSIWYM) Plugin for Rails

The wym_editor (WYSIWYM – “What you see is what you mean”) plugin is pretty cool. It allows you to define which form fields you want to offer WYSIWYM editing functionality. This makes it easier for you to edit fields and give them styles. It also allows you to see the HTML source view while you […]