Ruby On Rails 常見問題

2021-08-22 12:52:22 字數 2148 閱讀 2797

環境 windows vista home premium

1 使用gem更新gem自己

gem update --system

2 安裝rails

gem install rails --include-dependencies

之後確認版本:

3 使用mongrel伺服器(ruby預設沒有安裝)

gem install mongrel

此時使用ruby script/server 啟動伺服器的時候會出現如下錯誤:

=> call with -d to detach

=> ctrl-c to shutdown server

** starting mongrel listening at 0.0.0.0:3000

** starting rails with development environment...

** rails loaded.

** loading any rails specific gemplugins

exiting

c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re

quire': no such file to load -- c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.1-x86

-mswin32-60/lib/mongrel/init.rb (missingsourcefile)

from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re

quire'

from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_suppo

rt/dependencies.rb:496:in `require'

from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_suppo

rt/dependencies.rb:342:in `new_constants_in'

from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_suppo

rt/dependencies.rb:496:in `require'

from c:/ruby/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:1

34:in `load'

from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:166:in `eac

h'from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:166:in `eac

h'from c:/ruby/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:1

12:in `load'

... 21 levels...

from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/commands/server.rb:3

9from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `ge

m_original_require'

from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re

quire'

from script/server:3

原因是:mongrel安裝目錄和rails 2 中配置的目錄不一致,可以將mongrel目錄修改為

c:\ruby\lib\ruby\gems\1.8\gems\mongrel-1.1.1-mswin32

=>

c:\ruby\lib\ruby\gems\1.8\gems\mongrel-1.1.1-x86-mswin32-60

即可

常見問題 朗動常見問題

常見問題一 方向盤變沉 檢查胎壓是否正常,輪胎是否過度磨損。助力幫浦不工作,前輪氣壓低。冬天的話,冷車在冬天助力油比較稠,方向會重一點。檢查轉向助力油。1 應該是是助力系統有問題或則助力潤滑油有問題。2 如果你在駕車時感覺方向盤變緊,汽車偏向一側,需要檢查輪胎,或進行車輪平衡 定位。在這些問題剛剛發...

面試常見問題 1 this的常見問題

this 的含義 this關鍵字是乙個非常重要的語法點。毫不誇張地說,不理解它的含義,大部分開發任務都無法完成。前一章已經提到,this可以用在建構函式之中,表示例項物件。除此之外,this還可以用在別的場合。但不管是什麼場合,this都有乙個共同點 它總是返回乙個物件。簡單說,this就是屬性或方...

Spring常見問題

1 利用spring框架程式設計,console列印出log4j warn please initialize the log4j system properly?lupa開源社群 u i w.d t 說 明你的log4j.properties沒有配置。請把log4j.properties放到工程的...