Rails应用程序运行问题

时间:2012-06-20 13:45:30

标签: ruby-on-rails ruby deployment

所有。 Rails版本3.0.7; ruby版本1.8.7。 我有部署rails应用程序的问题。我从github repo中取出它们,运行bundle install。所有宝石安装正确(“您的捆绑完成!”)。但是当我尝试运行rails服务器时,我会收到以下信息:

ophui@ophui:~/rep/govno$ rails server
    /home/ophui/.rvm/gems/ruby-1.8.7-p358@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:74:in `require': no such file to load -- twilio/ruby (LoadError)
        from /home/ophui/.rvm/gems/ruby-1.8.7-p358@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:74:in `require'
        from /home/ophui/.rvm/gems/ruby-1.8.7-p358@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
        from /home/ophui/.rvm/gems/ruby-1.8.7-p358@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
        from /home/ophui/.rvm/gems/ruby-1.8.7-p358@global/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
        from /home/ophui/rep/govno/config/application.rb:7
        from /home/ophui/.rvm/gems/ruby-1.8.7-p358/gems/railties-3.0.7/lib/rails/commands.rb:28:in `require'
        from /home/ophui/.rvm/gems/ruby-1.8.7-p358/gems/railties-3.0.7/lib/rails/commands.rb:28
        from /home/ophui/.rvm/gems/ruby-1.8.7-p358/gems/railties-3.0.7/lib/rails/commands.rb:27:in `tap'
        from /home/ophui/.rvm/gems/ruby-1.8.7-p358/gems/railties-3.0.7/lib/rails/commands.rb:27
        from script/rails:6:in `require'
        from script/rails:6

PS。我刚刚在铁路新手。谢谢大家!

更新

我的 gemfile

source 'http://rubygems.org'

gem 'geocoder'
gem 'twilio-ruby'
gem 'localtunnel', :group => :development
gem "rake", "0.8.7"
gem 'sass'
gem 'haml'
gem 'request-log-analyzer'
gem 'daemons'
gem 'jasmine', :group => [:development, :test] 
gem "selenium-webdriver", "2.20.0"
gem 'jquery-rails', '>= 1.0.12'
gem 'whenever', :require => false
gem 'rails', '3.0.7'
gem 'sanitize'
gem "prawn"
gem "aws-s3", '>= 0.6.2', :require => 'aws/s3'
gem "geocoder-us", '1.1.0', :require => 'geocoder_us'
gem "yahoo", '1.1.0'
gem 'gchartrb', '0.8', :require => 'google_chart'
gem 'simple-rss'

#gem 'tiny_mce', :git => 'https://github.com/kete/tiny_mce.git'
gem 'will_paginate', '3.0.pre2'
gem 'defensio', '0.9.1'
gem 'imagesize', '0.1.1', :require => "image_size"
gem 'httpclient', '2.1.6.1'
gem 'rc-rest', '1.0.0', :require => 'rc_rest'
gem "fastercsv"
gem "koala" # FB library
gem "carmen" # Mapping for states of various countries
#gem "dynamic_form", :git => "https://github.com/joelmoss/dynamic_form"
gem "foreigner", "0.9.2" # Adds support to migrations to create foreign keys

gem 'shoulda', :group => :test
gem 'mocha', :group => :test
gem 'ruby-debug', :group => [:development, :test]
gem 'awesome_print', :group => [:development, :test]
gem "meta_where" # Nicer querying

group :cucumber do
  #gem "capybara" # test javascript
  gem "rspec", "~> 2.8"
  gem "database_cleaner"
  gem "cucumber-rails"
  gem 'pickle'
  #gem 'factory_girl'
  gem "factory_girl_rails", "1.2"
end
gem 'mysql2', '~> 0.2.7'

gemfile.lock 太大,无法在此处发布。 (约250行)他们还需要吗?

更新2

$ bundle install --path vendor/bundle 

返回以下内容:

Gems included by the bundle:
  * Ascii85 (1.0.1)
  * abstract (1.0.0)
  * actionmailer (3.0.7)
  * actionpack (3.0.7)
  * activemodel (3.0.7)
  * activerecord (3.0.7)
  * activeresource (3.0.7)
  * activesupport (3.0.7)
  * arel (2.0.10)
  * awesome_print (1.0.2)
  * aws-s3 (0.6.3)
  * builder (2.1.2)
  * bundler (1.1.4)
  * capybara (1.1.2)
  * carmen (0.2.13)
  * childprocess (0.3.2)
  * chronic (0.6.7)
  * columnize (0.3.6)
  * cucumber (1.2.1)
  * cucumber-rails (1.3.0)
  * daemons (1.1.8)
  * database_cleaner (0.8.0)
  * defensio (0.9.1)
  * diff-lcs (1.1.3)
  * dynamic_form (1.1.3 d31a6c0)
  * erubis (2.6.6)
  * factory_girl (2.1.2)
  * factory_girl_rails (1.2.0)
  * faraday (0.8.1)
  * fastercsv (1.5.5)
  * ffi (1.0.11)
  * foreigner (0.9.2)
  * gchartrb (0.8)
  * geocoder (1.1.2)
  * geocoder-us (1.1.0)
  * gherkin (2.11.0)
  * haml (3.1.6)
  * httparty (0.8.3)
  * httpclient (2.1.6.1)
  * i18n (0.5.0)
  * imagesize (0.1.1)
  * jasmine (1.2.0)
  * jasmine-core (1.2.0)
  * jquery-rails (1.0.19)
  * json (1.7.3)
  * jwt (0.1.4)
  * koala (1.5.0)
  * linecache (0.46)
  * localtunnel (0.3)
  * mail (2.2.19)
  * meta_where (1.0.4)
  * metaclass (0.0.1)
  * mime-types (1.18)
  * mocha (0.11.4)
  * multi_json (1.3.6)
  * multi_xml (0.5.1)
  * multipart-post (1.1.5)
  * mysql2 (0.2.18)
  * net-ssh (2.5.2)
  * net-ssh-gateway (1.1.0)
  * nokogiri (1.5.4)
  * pdf-reader (1.1.1)
  * pickle (0.4.10)
  * polyglot (0.3.3)
  * prawn (0.12.0)
  * rack (1.2.5)
  * rack-mount (0.6.14)
  * rack-test (0.5.7)
  * rails (3.0.7)
  * railties (3.0.7)
  * rake (0.8.7)
  * rbx-require-relative (0.0.9)
  * rc-rest (1.0.0)
  * request-log-analyzer (1.12.2)
  * rspec (2.10.0)
  * rspec-core (2.10.1)
  * rspec-expectations (2.10.0)
  * rspec-mocks (2.10.1)
  * ruby-debug (0.10.4)
  * ruby-debug-base (0.10.4)
  * ruby-rc4 (0.1.5)
  * rubyzip (0.9.9)
  * sanitize (2.0.3)
  * sass (3.1.19)
  * selenium-webdriver (2.20.0)
  * shoulda (3.0.1)
  * shoulda-context (1.0.0)
  * shoulda-matchers (1.0.0)
  * simple-rss (1.2.3)
  * thor (0.14.6)
  * tiny_mce (0.1.8 49aa365)
  * treetop (1.4.10)
  * ttfunk (1.0.3)
  * twilio-ruby (3.7.0)
  * tzinfo (0.3.33)
  * whenever (0.7.3)
  * will_paginate (3.0.pre2)
  * xml-simple (1.1.1)
  * xpath (0.1.4)
  * yahoo (1.1.0)

2 个答案:

答案 0 :(得分:1)

尝试安装gem

gem install twilio
gem install twilio-ruby

答案 1 :(得分:0)

拜托,试一试:

$ bundle install --path vendor/bundle