ECM References 2 Module
This project rocks and uses MIT-LICENSE.
Migrating from 1.x.x to 2.0.0
Add active_admin-awesome_nested_set to your gemfile, if you are using activeadmin:
# Gemfile
gem 'active_admin-acts_as_list'
Prerequisites when using active admin
if you are using activeadmin as backend, ecm_cms2 comes with admin files to provide a backend. In that case, you’ll need active_admin-acts_as_list. Add it to your gemfile:
# Gemfile
gem 'active_admin-acts_as_list'
gem 'active_admin-awesome_nested_set'
Installation
Add it to your Gemfile:
# Gemfile
gem 'ecm_references2'
Add the initializer:
rails g ecm:references:install
Add the migrations:
rake ecm_references_engine:install:migrations
rake db:migrate
Add the routes:
# config/routes.rb
Ecm::References::Routing.routes(self)
Running tests
gem install bundler
bundle
cd spec/dummy && rake db:migrate RAILS_ENV=test && cd ../..
guard
FAQ
Q: Bundling fails installing RedCloth with message “Failed to build native extension.…/home/vagrant/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:456:in ‘try_do’: The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.”. What can I do?
A: Install libgmp-dev:
sudo apt-get install -y libgmp-dev
Q: Tests fail with message “Paperclip::Errors::CommandNotFoundError: Could not run the ‘identify` command. Please install ImageMagick.”. What can I do?
A: Install imagemagick:
sudo apt-get install -y imagemagick