2012-05-08 130 views
0

這個問題已經困擾了我幾個小時了。我正在共享託管站點部署Rails3應用程序。我已經能夠在我的本地Ubuntu上運行該網站。它運作良好。但是,當我嘗試在線部署它時,效果不佳。所以我認爲這可能與版本有關。另外,我沒有在我的任何模塊中使用這個gem。該錯誤消息如下:沒有這樣的文件加載 - FasterCSV

A source file that the application requires, is missing. 
It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded. 
A required library may not installed. Please install all libraries that this application requires. 
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem. 

Error message: 
No such file to load -- FasterCSV 
Exception class: 
LoadError 

回溯:

# File Line Location 
0 /home/dev/project/vendor/bundle/ruby/1.8/gems/activesupport-3.1.4/lib/active_support/dependencies.rb 306 in `depend_on' 
1 /home/dev/project/vendor/bundle/ruby/1.8/gems/activesupport-3.1.4/lib/active_support/dependencies.rb 214 in `require_dependency' 
2 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/engine.rb 417 in `eager_load!' 
3 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/engine.rb 416 in `each' 
4 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/engine.rb 416 in `eager_load!' 
5 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/engine.rb 414 in `each' 
6 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/engine.rb 414 in `eager_load!' 
7 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/application/finisher.rb 51 
8 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/initializable.rb 30 in `instance_exec' 
9 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/initializable.rb 30 in `run' 
10 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/initializable.rb 55 in `run_initializers' 
11 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/initializable.rb 54 in `each' 
12 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/initializable.rb 54 in `run_initializers' 
13 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/application.rb 96 in `initialize!' 
14 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/railtie/configurable.rb 30 in `send' 
15 /home/dev/project/vendor/bundle/ruby/1.8/gems/railties-3.1.4/lib/rails/railtie/configurable.rb 30 in `method_missing' 
16 /home/dev/project/config/environment.rb 15 
17 config.ru 3 in `require' 
18 config.ru 3 
19 /home/dev/project/vendor/bundle/ruby/1.8/gems/rack-1.3.6/lib/rack/builder.rb 51 in `instance_eval' 
20 /home/dev/project/vendor/bundle/ruby/1.8/gems/rack-1.3.6/lib/rack/builder.rb 51 in `initialize' 
21 config.ru 1 in `new' 
22 config.ru 1 

紅寶石-v返回

ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux] 

的Rails -v返回

Rails 3.1.4 

我部署的應用程序使用Phusion Passenger。

任何幫助都可以。提前致謝。

更新:

這裏的config.ru

require ::File.expand_path('../config/environment', __FILE__) 
run project::Application 

的environment.rb

# Load the rails application 

#require 'will_paginate' 
require 'rubygems' 
require 'composite_primary_keys' 
require 'logger' 
require 'json' 
#require 'composite_primary_keys' 
require File.expand_path('../application', __FILE__) 



# Initialize the rails application 
Dealmap::Application.initialize! 
Rails.logger = Logger.new(STDOUT) 

的Gemfile:

source 'http://rubygems.org' 

gem 'rails' 
# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem 'mysql2', '0.3.11' 
#gem 'typus' 
gem 'nokogiri' 
gem 'geokit' 
gem 'composite_primary_keys' 
gem "rake", "0.8.7" 
gem 'geocoder' 
gem 'htmlentities' 
gem 'json' 
gem 'execjs' 
gem 'therubyracer' 
gem 'activeadmin' 
gem "meta_search", '>= 1.1.0.pre' 
gem "nifty-generators", :group => :development 
gem 'fastercsv' 

gem 'gmaps4rails' 

# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'sass-rails', '~> 3.1.5' 
    gem 'coffee-rails', '~> 3.1.1' 
    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

# To use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# To use Jbuilder templates for JSON 
# gem 'jbuilder' 

# Use unicorn as the web server 
# gem 'unicorn' 

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'ruby-debug19', :require => 'ruby-debug' 

gem "mocha", :group => :test 

注意:我明確地將項目名稱更改爲「項目」。此外,我最近添加gem 'fastercsv'線在錯誤顯示後的Gemfile中。

非常感謝!

+0

你可以粘貼'config.ru','Gemfile'和'config/environment.rb'文件嗎?所有的寶石安裝在你的主機上? – Kashyap

+0

沒有更新的要求。 – nmenego

回答

0

我向技術支持尋求幫助。看來,錯誤是我在.htaccess中指向了錯誤的應用程序版本。

問題解決了。

相關問題