试图安装炼油厂cms ror gem

时间:2016-01-23 10:17:40

标签: ruby-on-rails ruby refinerycms

我正在尝试安装refiny cms:

我写了

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

得到了这个:

  

git source https://github.com/refinery/refinerycms尚未检出。请在尝试启动您的应用程序之前运行bundle install   我跑

bundle install

得到了这个:

Bundler could not find compatible versions for gem "actionpack":
  In Gemfile:
    rails (= 4.0.2) was resolved to 4.0.2, which depends on
      railties (= 4.0.2) was resolved to 4.0.2, which depends on
        actionpack (= 4.0.2)

    rails (= 4.0.2) was resolved to 4.0.2, which depends on
      railties (= 4.0.2) was resolved to 4.0.2, which depends on
        actionpack (= 4.0.2)

    rails (= 4.0.2) was resolved to 4.0.2, which depends on
      railties (= 4.0.2) was resolved to 4.0.2, which depends on
        actionpack (= 4.0.2)

    refinerycms was resolved to 3.0.0, which depends on
      refinerycms-core (= 3.0.0) was resolved to 3.0.0, which depends on
        actionpack (< 5.0, >= 4.2.3)

我对rails非常陌生。我该如何解决这个问题?

UPD: 建议我改变我的宝石文件:并添加了gem&#39; refinerycms&#39;

这是我现在的完整宝石文件:

   source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

#gem 'refinerycms', git: 'https://github.com/refinery/refinerycms', branch: 'master'

gem 'quiet_assets', group: :development

# Add support for searching inside Refinery's admin interface.
gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.0']

# Add support for Refinery's custom fork of the visual editor WYMeditor.
gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.6']

# The default authentication adapter
gem 'refinerycms-authentication-devise', '~> 1.0'
gem 'refinerycms' 

当我跑bundle install时,我仍然收到以下错误:

Bundler could not find compatible versions for gem "actionpack":
  In Gemfile:
    rails (= 4.0.2) was resolved to 4.0.2, which depends on
      railties (= 4.0.2) was resolved to 4.0.2, which depends on
        actionpack (= 4.0.2)

    rails (= 4.0.2) was resolved to 4.0.2, which depends on
      railties (= 4.0.2) was resolved to 4.0.2, which depends on
        actionpack (= 4.0.2)

    rails (= 4.0.2) was resolved to 4.0.2, which depends on
      railties (= 4.0.2) was resolved to 4.0.2, which depends on
        actionpack (= 4.0.2)

refinerycms-wymeditor (>= 1.0.6, ~> 1.0) was resolved to 1.0.6, which depends
on
      refinerycms-core (>= 3.0.0, ~> 3.0) was resolved to 3.0.0, which depends on
        actionpack (< 5.0, >= 4.2.3)

    rails (= 4.0.2) was resolved to 4.0.2, which depends on
      sprockets-rails (~> 2.0.0) was resolved to 2.0.1, which depends on
        actionpack (>= 3.0)

1 个答案:

答案 0 :(得分:1)

您遇到的错误是由于rails,refinerycms和actionpack之间的版本不兼容造成的。如果您不太关心在您的应用程序中使用的refinerycms版本,那么您可以创建一个新的rails应用程序并在Gemfile中添加以下内容: -

gem 'refinerycms' 

这将解决依赖关系并安装与rails版本兼容的精炼版本:)