Cloning the repo
git clone https://github.com/Futnotes/dev_test-2.git devtest
Mixtures of errors doing bundle install though
First it is capybara
Using capybara (1.1.2)
Installing capybara-webkit (0.12.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
According to these sources thoughtbot and stackoverflow qt need to be installed first, before install capybara.
To install qt, you must link to libpng, simply link to linpng will fail due to permission,
Error: Could not symlink file: /usr/local/Cellar/libpng/1.5.13/lib/pkgconfig/libpng15.pc
/usr/local/lib/pkgconfig is not writable. You should change its permissions.
To fix that
sudo chown -R kahfei /usr/local/lib/pkgconfig
then only follow by command below
brew link libpng
brew install qt
bundle install still fail though
An error occurred while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.
It seems that lot of people having this same problem. Some of the suggestion work for some people, but none of it fixed my problem. Apparently this is a rmagick bug, as it does not support the newer version of ImageMagick. rmagick has not been updated for two years, so if there is an option, change to other gem to work with image, like minimagick
After hours of scouring the internet, and trying a few different approaches, using the magick-installer to install ImageMagick, then
work again. No actually I lie, bundle install yield another error
ERROR: While executing gem … (ArgumentError) marshal data too short
There are suggestions to remove ~./gem folder altogether and reinstall all the gem. But in my case, bundle install work on other rails apps, just not this one. So I clone again the repo to a new folder, now bundle install work!
Now creating development, testing and production environment. I already have postgresql installed locally, so I will use postgresql, my database.yml looks something like this
now to create them
All three database created
with a long list of errors, it start with something like this
PG::Error: ERROR: column "position" does not exist
LINE 1: ...RE "competitions"."name" = 'Premiership' ORDER BY position, ...