将refinerycms集成到现有的rails应用程序中

时间:2015-12-25 09:40:40

标签: ruby-on-rails-4 refinerycms

我尝试在documentation之后将refinerycms合并到我的应用程序中。将gem添加到gemfile并运行bundler之后,当我运行rails g refinery时,我遇到了一些错误:cms --fresh-installation或者当我尝试运行任何rails或rake命令时。

这是我的宝石文件

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

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

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

#refinerycms
gem 'refinerycms'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a  debugger console
 gem 'byebug'
end

group :development do
 # Access an IRB console on exception pages or by using <%= console %> in views
 gem 'web-console', '~> 2.0'

 # Spring speeds up development by keeping your application running in   the background. Read more: https://github.com/rails/spring
 gem 'spring'
 end

 group :production do
  gem 'rails_12factor'
 end

 ruby "2.2.0"

和堆栈跟踪

/usr/local/lib/ruby/gems/2.2.0/gems/speakingurl-rails-1.1.5/lib/speakingurl-rails.rb:8:in `block in <class:Railtie>': undefined method `prepend_path' for nil:NilClass (NoMethodError)
from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /Users/Jesmine/workspace/proj/config/environment.rb:5:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!'
from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:142:in `require_application_and_environment!'
from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:67:in `console'
from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

1 个答案:

答案 0 :(得分:4)

<?xml version="1.0"?> <project name="Application Services" basedir="." default="compile"> <property file="build.properties"/> <path id="external.projects"> <fileset dir="/scratch/softwares" includes="*.jar"/> </path> <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen" classpathref="external.projects"> </taskdef> <target name="compile" depends="clean,init"> <javac destdir="${build.dir}" srcdir="${src.dir}" classpathref="external.projects"/> </target> <target name="packaging" depends="compile"> <mkdir dir="${jar.dir}"/> <jar destfile="${jar.dir}/application.services.jar" basedir="${build.dir}"/> <wsgen sei="webservice.interfaces.student.IStudentApplicationService" destdir="${jar.dir}" cp="external.projects" resourcedestdir="${jar.dir}" sourcedestdir="${jar.dir}" genwsdl="true" /> </target> </project> gem尚未支持Sprockets 3.0。 我通过在Gemfile中锁定speakingurl-rails来修复此问题。

以下是RefineryCMSspeakingurl的拉取请求。