部署此問題時出現了一些問題。我試過現在部署兩次。以下是我迄今所做....將Chiliproject部署到Dreamhost中
安裝在install page所需的寶石和版本:
gem install -v=2.3.5 rails
gem install -v=1.0.1 rack
gem install -v=0.8.7 rake
gem install -v=0.4.2 i18n
下載的軟件包:
git clone git://github.com/chiliproject/chiliproject.git
cd chiliproject
git checkout stable
必須找到並設置捆綁因爲它不在我的路徑:
BUNDLE="/usr/lib/ruby/gems/1.8/bin/bundle"
將我的數據庫信息放入database.y毫升:
然後開始捆東西:
$BUNDLE install --without=postgres rmagick
$BUNDLE exec rake generate_session_store
最後的命令得到了錯誤:
rake aborted!
can't activate rails (= 2.3.5, runtime), already activated rails-2.3.12. Make sure all dependencies are added to Gemfile.
所以我在Gemfile中改變2.3.12至2.3.5,並進行了:
RAIL_ENV=production $BUNDLE exec rake db:migrate
然後我得到了這個命令的錯誤太:
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `autoload_paths' for #<Rails::Configuration:0x68a68dbb82c0>
/home/USERNAME/DOMAIN/public/config/environment.rb:44
我嘗試註釋掉線44在那裏,但隨後拋出另一個錯誤undefined method
convert_to_without_fallback_on_iso_8859_1' 爲Class'
類,所以我不想它進一步發揮左右。 注意這隻發生在我第二次嘗試部署它。我第一次嘗試db:migrate succeeded(並且我檢查了數據庫中沒有數據)。
* 因此,對於第二次嘗試,我堅持在這裏:-(*
但是,這是發生了什麼DB後第一次:遷移succeded ....
RAILS_ENV=production $BUNDLE exec rake redmine:load_default_data
隨着最後一個命令,但它失敗了說權限被拒絕爲mysql'user'@173.236.128.0/255.255.128.0',我就像是WTF試圖連接到一個網絡,就像它是一個主機?
所以我感動開啓,複製我的配置文件和env在ironment改變的文件/添加如下幾行:
# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.5'# unless defined? RAILS_GEM_VERSION
if ENV['RAILS_ENV'] == 'production' # don't bother on dev
ENV['GEM_PATH'] = '/home/USERNAME/.gems' + ':/usr/lib/ruby/gems/1.8'
end
然後做這個東西可寫並重新啓動乘客:
chmod -R 777 files log tmp public/plugin_assets/
touch tmp/restart.txt
對不起文本的牆上,是任何人都能夠在照一些輕我做錯了什麼?
在此先感謝。
編輯:所以這是完全錯誤的,這裏就是我得到了它的工作
rm ~/.gem*
gem install bundler
PATH=$PATH:/usr/lib/ruby/gems/1.8/bin
cd ~
git clone git://github.com/chiliproject/chiliproject.git
cd chiliproject
git checkout stable
cp * ../example.com/ -R
cd ../example.com
# Make sure database is working
bundle install --without postgres rmagick test
bundle exec rake generate_session_store
RAILS_ENV=production bundle exec rake db:migrate
# No output is no good, check database.yml
RAILS_ENV=production bundle exec rake redmine:load_default_data
或者看到這一點:https://gist.github.com/1127306
謝謝你。我被一個乘客錯誤卡住,說它找不到寶石,但沒有說出哪一個。我跑了你說的命令,它開始工作耶!這裏是我使用的命令列表,使其工作https://gist.github.com/1127306再次感謝:) – hamstar