简体   繁体   English

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

[英]Rails - New temp directory getting automatically created every time I run bundler command

I have generated a basic web app using Rails 4.1.4/Ember.js and everything works as expected, but every time I run 'bundle install' etc. it creates a new (empty) folder in my root directory of the form 'bundler20140904-22128-1jtt7b7' (the random digits at the end change each time). 我已经使用Rails 4.1.4 / Ember.js生成了一个基本的Web应用程序,并且一切正常,但是每次运行“捆绑安装”等时,它都会在根目录中以“ bundler20140904 ”的形式创建一个新的(空)文件夹。 -22128-1jtt7b7' (末尾的随机数字每次都会更改)。 They pile up so deleting them is getting kind of annoying, but does anyone have any ideas why this could be happening??. 它们堆积如山,因此删除它们会变得很烦人,但是没有人知道为什么会发生这种情况吗? I couldn't find any info via Google, but I was consulting this tutorial if that helps. 我无法通过Google找到任何信息,但是如果有帮助,我正在咨询本教程 I'm running CentOS 6.5 with RVM and I have no idea which files are relevant but here's my application.rb : 我正在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 : 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'

If you need any more info please let me know. 如果您需要更多信息,请告诉我。 I'd be grateful for any help you can provide! 感谢您提供的任何帮助!

Hey everyone thanks for the help. 大家好,谢谢您的帮助。 I ended up re-generating the app from scratch, and the problem went away. 我最终从头开始重新生成应用程序,问题消失了。 As far as what was causing this, it looks like for some reason the line: 至于造成这种情况的原因,由于某种原因,该行看起来像:

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

in my Gemfile was causing problems. 在我的Gemfile中引起了问题。 I changed it to: 我将其更改为:

gem 'ember-rails'

and it was fixed. 它是固定的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM