gpt4 book ai didi

ruby-on-rails - Rails - 不知道如何构建任务 'assets:precompile:primary'

转载 作者:行者123 更新时间:2023-12-04 06:16:33 25 4
gpt4 key购买 nike

当我尝试运行 rake db:migrate 时出现此错误

rake aborted!
Don't know how to build task 'assets:precompile:primary'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task_manager.rb:49:in `[]'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:339:in `[]'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/tinymce-rails-langs-0.1/lib/tasks/assets.rake:1:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:in `block in load'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:213:in `load_dependency'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:641:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:641:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:641:in `run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/application.rb:243:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine/railties.rb:17:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine/railties.rb:17:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/application.rb:243:in `run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:446:in `load_tasks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/mate/sites/rails_projects/bev/Rakefile:6:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/bin/rake:23:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/bin/rake:23:in `<main>'
/usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'

我正在使用 Rails 4 rc2 和 Ruby 2.0 以及 Compass。

compass 配置:
project_type = :rails
http_path = '/'
css_dir = "app/assets/stylesheets"
sass_dir = "app/assets/sass"

我的 Gemfile:
source 'https://rubygems.org'
ruby '2.0.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0.rc2'

# Use sqlite3 as the database for Active Record
group :development, :test do
gem 'sqlite3'
end

group :production do
gem 'pg'
end

# Use SCSS for stylesheets
group :assets do
gem 'sass-rails', github: 'rails/sass-rails'
gem 'coffee-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'compass-rails', github: 'milgner/compass-rails', ref: '1749c06f15dc4b058427e7969810457213647fb8'
end

# gem 'sprockets-rails', github: 'rails/sprockets-rails'

gem 'carrierwave'
gem 'tinymce-rails', github: 'spohlenz/tinymce-rails', ref: '7eeb0cbf089f895ff23513eb1017cf389b09bfa7'
gem 'tinymce-rails-langs'

# Use Uglifier as compressor for JavaScript assets

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
group :production do
gem 'therubyracer', platforms: :ruby
end
# 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.0.0'

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

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

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

group :development do
gem 'rails-footnotes'
end

gem 'devise', '3.0.0.rc'

我试图解决这个问题 2 天,这让我发疯......

有人遇到过同样的问题吗?

最好的祝愿,
马特

最佳答案

问题解决了。 tinymce-rails-langs gem 导致了这个问题。简单的注释掉了。

关于ruby-on-rails - Rails - 不知道如何构建任务 'assets:precompile:primary',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17134769/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com