简体   繁体   English

尝试安装炼油厂cms ror gem

[英]Trying to install refinery cms ror gem

I am trying to install refiny cms: 我正在尝试安装精炼cms:

I wrote 我写

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

And got this: 并得到这个:

The git source https://github.com/refinery/refinerycms is not yet checked out. git源https://github.com/refinery/refinerycms尚未签出。 Please run bundle install before trying to start your application I run 在尝试启动我运行的应用程序之前,请运行bundle install

bundle install

And got this: 并得到这个:

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)

I am really new to rails. 我真的是新手。 How do I fix this? 我该如何解决?

Upd: As suggested I changed my gem file: and added gem 'refinerycms' 更新:按照建议,我更改了我的gem文件:并添加了gem'refinerycms'

This is my complete gemfile now: 现在,这是我完整的gemfile:

   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' 

When I ran bundle install I still get the following error: 当我运行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)

The error you are getting is due to version incompatibility between rails , refinerycms and actionpack . 您收到的错误是由于rails,finerycms和actionpack之间的版本不兼容所致。 If you are not much concerned about the refinerycms version to be used in you app , then you can just create a new rails application and add the following in your Gemfile :- 如果您不太担心要在您的应用程序中使用的fineryrycms版本,则可以创建一个新的rails应用程序并将以下内容添加到您的Gemfile中:

gem 'refinerycms' 

This would resolve the dependencies and install the refinery version compatible with your rails version :) 这将解决依赖关系并安装与您的rails版本兼容的炼油厂版本:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM