Rails - 每次运行bundler命令时都会自动创建新的临时目录

时间:2014-09-03 16:13:17

标签: ruby-on-rails ruby bundler

我使用Rails 4.1.4 / Ember.js生成了一个基本的Web应用程序,一切都按预期工作,但每次运行' bundle install'它会在我的根目录中创建一个新的(空)文件夹,其形式为' bundler20140904-22128-1jtt7b7' (每次最后的随机数字都会改变)。他们堆积起来,所以删除它们会变得有点讨厌,但是有没有人有任何想法为什么会发生这种情况?我无法通过Google找到任何信息,但如果有帮助,我正在咨询this tutorial。我使用RVM运行CentOS 6.5,我不知道哪些文件是相关的,但这里是 application.rb

require File.expand_path('../boot', __FILE__)

require 'rails/all'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module MyProject
  class Application < Rails::Application
  end
end

config.ru

# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment',  __FILE__)
run Rails.application

的Gemfile

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.4'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use jquery as the JavaScript library
gem 'jquery-rails'

# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

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

# 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

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

#EMBER
gem 'ember-rails', git: 'git://github.com/emberjs/ember-rails.git'

如果您需要更多信息,请告诉我。我很感激您能提供任何帮助!

1 个答案:

答案 0 :(得分:0)

嘿大家都感谢你的帮助。我最终从头开始重新生成应用程序,问题就消失了。至于造成这种情况的原因,看起来由于某种原因,该行:

gem 'ember-rails', git: 'git://github.com/emberjs/ember-rails.git'

我的Gemfile中的

导致了问题。我改成了:

gem 'ember-rails'

它被修复了。