small medium large xlarge

Nick_london_pragsmall
03 Nov 2016, 19:37
Nicholas Parsons (8 posts)

Hi All -

Just a warning for those of you following the second edition of this book using a Windows 10 machine. The devise gem requires bcrypt and this library is very volatile in the Windows environment. I had to jump through hoops to get the bcrypt_ext to work right. It seems like every time you add new item to that gemfile and run bundle install it always fails asking to install bcrypt (3.1.11). In order to get devise to install at all I had to use bcrypt-ruby version 3.1.5. So I got up to the Testing chapter in the book and it asks for the rspec gem to be installed and sure enough I got the bcrypt error again after running bundle install. If you are following along on a Windows 10 machine, I would advise installing all the gems at once in the Gemfile and don’t touch it again to prevent this from happening to you.

I know this isn’t Dave’s fault and the book is a great read but just wanted to save you some frustration.

–Nick

===UPDATE=== I discovered that if you do a “gem install rspec -v ‘3.0.1’” for example before running the “bundle install” on Windows it will go through fine without giving the bcrypt error.

Generic-user-small
18 Nov 2016, 21:01
Matthew Welke (2 posts)

It’s worth mentioning that Rails development on Windows is generally fickle. In my experience, learning how to use Linux systems was less stressful than living with the way Rails development is done on Windows. It’s also far more rewarding, since Linux is the operating system of the web.

I highly recommend people use Linux as they complete this book. Even if you’ve never used it before, you’ll likely have an easier time long term. You can use VirtualBox to run a virtual machine on your Windows computer for your Rails development if you don’t want to use Linux as your main operating system.

Ubuntu comes with Ruby 2.3+ installed, so you eliminate the need for any complex Ruby installation methods (like RVM or RBENV). For learning purposes, using a vanilla Ruby installation is fine.

Generic-user-small
29 Nov 2016, 18:44
Kemory Grubb (7 posts)

As a general rule, serious Rails development should never be attempted on a Windows machine, except through a VM. Too many important gems break on Windows, e.g., nokogiri, mysql2, pg and bcrypt.

You must be logged in to comment