Category Archives: Ruby

LoadError: cannot load such file — bcrypt_ext

I got a bcrypt error when using Devise on Windows 10 and Ruby 2.2.2p95 and rails 4.2.5

You should have DevKit installed and configured correctly to recompile the gem.

Firt stop your server and remove every bcrypt gem or bcrypt-ruby gem.

Don’t forget to include bcrypt in your Gemfile

make a bundle update and recompile the gem like this

Restart your server.

It should do the trick !

How to manage or clean gems

I had to clean my ruby gems because it was using a lot of space. So what were my options to get free space ? One single command to rule them all !

Here is a Windows command to uninstall all gems from your computer except a few one you cannot delete.

On Linux, to remove ALL gems, that would be:

Read More →

Install mysql2 gem on windows

I spent almost an entire evening to find out why I couldn’t install the mysql2 gem on my windows 8.1. Don’t know if it’s easier with previous windows but I’ll show you how I did it.

A bundle install gave me this

Read More →

Learn Ruby programming language by playing a fun game : Ruby Warrior

I played a really cool game to learn Ruby syntax in a funny way! :D You should try it.

Just control and be a player by typing some Ruby code lines.

It was great to improve myself in loops, conditions, method declaration syntaxes.

Even if I liked the music, at lease the first two minutes ‘-_- , you can disable it top-left of your screen.

Be a Ruby Warrior now ! ;)

Read More →

Error running Development: Rails 3.x launcher script was found instead of Rails 4.x one.

Error running Development: XXXX: Rails 3.x launcher script was found instead of Rails 4.x one. You need ‘C:/XXXX/bin/rails’ script to launch Rails server. Please update server launcher according to Rails 4.x documentation.

We had an error when upgrading from rails 3.2 to 4.0.0. To resolve it, you need to adapt the project structure by renaming the script directory into bin.

Now you should have /bin/rails and no more error.

If you still have a problem, just create a new rails project and copy the bin folder to your old one that need an upgrade to 4.0.0.

Rails 4.0.0 Release Notes

Compatibility problem between gems, RubyGems or Bundler ?

I tried a prerelease of ruby and I had a nice compatibility problem when gem update command

It seems bundler is not compatible with the new Rubygem version.

Read More →

How to install your Ruby Rails environment

Before playing with rails, you have some prerequisites. You need the ruby engine, a DevKit to let you compile native extension and the rails gem.

I will show you how to install all of them on windows. It’s a lot easier on Linux ! (apt-get install ruby && gem install rails)

  • Grab the latest installer 32 or 64 bit, install it on C:\Ruby
  • Download the DevKit too, if you don’t have MinGW installed on your computer, take the MinGW included auto extractor 32 or 64 bit. Extract it on C:\DevKit Read More →