Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Refinery CMS using Rails 4

I previously never had a problem with Refinery. I was refreshing my knowledge by following along to the tutorial http://railscasts.com/episodes/332-refinery-cms-basics .Then when I created a new app with Refinery CMS, I got this error

Bundler could not find compatible versions for gem "actionmailer":
  In Gemfile:
    refinerycms (~> 2.1.0) ruby depends on
      actionmailer (< 3.3, >= 3.1.3) ruby

    rails (= 4.0.0) ruby depends on
      actionmailer (4.0.0)

But should not these things be there by default with the CMS? why would there be errors only now?

like image 504
JGallardo Avatar asked Aug 21 '13 18:08

JGallardo


4 Answers

The latest code supports Rails 4; the gem must be sourced from the master branch, until a release is made.

Git Issue #2428 - Rails 4 support

Add to your Gemfile:

gem 'refinerycms-i18n', github: 'refinery/refinerycms-i18n', branch: 'master'
gem 'refinerycms', github: 'refinery/refinerycms', branch: "master"
# Strong parameters is a new feature not used by Refinery
gem 'protected_attributes'

Do a:

$ bundle install 

Create a new Refinery app, the command will be different depending on what you want to do. For that there are a few guides that you can follow. In my case, I added it to an existing app with:

$ rails generate refinery:cms --fresh-installation

Start your server and go to: http://localhost:3000/refinery

like image 118
givanse Avatar answered Nov 08 '22 08:11

givanse


Well, my five cents are that Refinery is not yet available for Rails 4:

  • Is there any cms for Rails 4?
  • http://refinerycms.com/
  • http://refinerycms.com/blog/refinery-cms-210-released

Best, Ben.

like image 3
Ben Avatar answered Nov 08 '22 08:11

Ben


Simply initialize the application using:

rails new my_new_application -m http://refinerycms.com/t/edge

Behind the scenes: This command makes your application use the master branch of refinery, which supports Rails 4.

Update Although the above is the easiest and official way, it didn't totally work for me. I had to manually run the following command after the above one:

 rails generate refinery:cms --fresh-installation
like image 2
Zuhaib Ali Avatar answered Nov 08 '22 09:11

Zuhaib Ali


Looks like the rails4 branch has been getting a bit of love over the past few days:

https://github.com/refinery/refinerycms/tree/rails4

I will try it out and update with how I get on.

like image 1
complistic Avatar answered Nov 08 '22 09:11

complistic