我已经构建了我的新rails应用程序,当我在执行bundle exec rake secret
时尝试部署到Apache服务器时,我得到rake aborted! cannot load such file -- ap
。这是我提到的部署Deploying a Ruby app on a Linux/Unix production server的URL 。
请查看我的Gemfile
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.4'
# Use sqlite3 as the database for Active Record
gem 'mysql2'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'jquery-rails'
gem 'json'
gem 'jenkins_api_client'
gem 'mailfactory'
gem 'docx','>=0.2.07'
# gem 'jquery-turbolinks'
gem 'net-scp'
gem 'rubyXL'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'bcrypt'
# font awsome
gem "font-awesome-rails"
# parsley validation
gem "parsley-rails"
# devise for athentication
gem 'devise'
# gem "devise_ldap_authenticatable"
gem "toastr-rails"
# datapciker
gem 'bootstrap-datepicker-rails'
# image uploader
gem 'carrierwave'
# Active admin for admin
# gem 'activeadmin'
# To set dynamic value in docx
gem 'sablon'
# State_machine for status
gem 'aasm'
# Soft delete
gem 'paranoia'
# for seed
gem 'seed-fu'
# Net-SSH gem to exec batch file.
gem 'net-ssh'
# Schedule job
gem 'whenever', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'pry'
gem 'better_errors'
gem 'binding_of_caller'
gem 'meta_request'
gem "awesome_print", require:"ap"
# gem 'quiet_assets'
gem 'pry-rails'
gem 'bullet'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
这是我尝试部署的第一个应用程序,请帮助解决此问题
我的红宝石版本是
ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]
rails version - 5.1.4
答案 0 :(得分:3)
Gemfile中的这一行对我来说很奇怪
gem "awesome_print", require:"ap"
您可以删除require: "ap"
并检查它是否有效吗?