出于某种原因,当我运行bundle install它时,安装到生产:
Your bundle is complete! It was installed into ./RAILS_ENV=production
Arrrghh,我该如何切换回开发?
笔记:
Rails.env从控制台运行时,我得到了"development"宝石文件:
source 'http://rubygems.org'
gem 'rails', '3.0.3'
gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3'
group :development do
  gem 'rspec-rails'
  gem 'nokogiri'
  gem 'will_paginate'
end
group :test do
  gem 'rspec'
end
另外值得注意的是,它在我的应用程序中创建了一个文件夹,我在这里RAILS_ENV=production发布了一个问题,现在我猜这个问题与这个问题有关.
当我运行时,bundle config我得到以下信息,你可以清楚地看到路径被设置为罪魁祸首!我有什么想法改变这个吗?我尝试重新安装bundler gem但无济于事,也许这是Bundler中的一个bug?
$ bundle config
Settings are listed in order of priority. The top value will be used.
disable_shared_gems
  Set for your local app …我在这里结束了,并且正在向大家求助于这个f*#$ ^编码问题.
我在Dreamhost上具有root权限的私有服务器上运行.这里有一些关于我的环境和版本.
$ `which ruby` -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
$ `which bundle` -v
Bundler version 1.0.15
$ `which rails` -v
Rails 3.0.9
除了这个错误,我的rails应用程序运行良好没有问题.但是,当我尝试使用以下encode方法更改编码字符串时:
NoMethodError: undefined method `encode' for "foobar":String
encode 应该定义,但它不是!Encoding如果我尝试进入,我会发现irb:
$ irb
ruby-1.9.2-p180 :001 > Encoding
 => Encoding
ruby-1.9.2-p180 :002 > "foobar".encode('utf-8')
 => "foobar"
但是如果我尝试通过bundle exec使用rails控制台,Encoding则找不到:
$ bundle exec rails c staging
Loading staging environment (Rails 3.0.9)
ruby-1.9.2-p180 :001 > Encoding
NameError: uninitialized constant Encoding
    from …