在Ubuntu上运行此命令后,我一直收到以下错误:
sudo -u huginn -H bundle install --deployment --without development test
这是错误:
[!] There was an error parsing `Gemfile`: Line " RAILS_ENV=production" doesn't match format. Bundler cannot continue.
from /home/huginn/huginn/Gemfile:14
-------------------------------------------
require File.join(File.dirname(__FILE__), 'lib/gemfile_helper.rb') GemfileHelper.load_dotenv do |dotenv_dir| # path dotenv_dir do #
-------------------------------------------
我有最新版本的bundler
编辑:这是我的Gemfile:
# Ruby 2.2.2 is the minimum requirement ruby ['2.2.2', RUBY_VERSION].max
# Ensure github repositories are fetched using HTTPS git_source(:github) do |repo_name| repo_name =
"#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git" end if
Gem::Version.new(Bundler::VERSION) < Gem::Version.new('2')
# Load vendored dotenv gem and .env file require File.join(File.dirname(__FILE__), 'lib/gemfile_helper.rb')
GemfileHelper.load_dotenv do |dotenv_dir| path dotenv_dir do
gem 'dotenv'
gem 'dotenv-rails' end end