2014-04-22 23 views
0

簡介:Gitlab項目 - 無法運行「軌道產生」

  • 我有gitlab的安裝在本地LXC容器運行Ubuntu 13.10 - 俏皮。
  • 我已經安裝RVM作爲作爲多用戶安裝 - 在/usr/local/rvm
  • 爲了與RVM運行gitlab我已經創建了束命令的封裝作爲指定here

  • 的gitlab應用是正常運行,但我有一個問題,運行rails generate功能我也跟着

步驟:

  • $ sudo su git - 登錄爲git的用戶
  • $ cd /home/git/gitlab
  • $ source /etc/profile/
  • $ rvm use gemset [email protected] - 我創建
  • 定製的寶石
  • $ gem list - 列出所有出現在Gemfile中的gitlab,所以我知道我的寶石我右邊寶石
  • $ rails -v - >的Rails 4.0.3
  • $ rails generate --help將輸出

    /usr/local/rvm/gems/[email protected]/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require': cannot load such file -- rb-inotify (LoadError) 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require' 
    from /usr/local/rvm/gems/[email protected]/gems/bundler-1.5.3/lib/bundler.rb:131:in `require' 
    from /home/git/gitlab/config/application.rb:6:in `<top (required)>' 
    from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/commands.rb:43:in `require' 
    from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/commands.rb:43:in `<top (required)>' 
    from bin/rails:8:in `require' 
    from bin/rails:8:in `<main>' 
    

我從這個輸出收集什麼是它以某種方式試圖使用[email protected]寶石。

如果我切換到該寶石$ rvm use gemset [email protected]$ gem list將輸出

*** LOCAL GEMS *** 

bigdecimal (1.2.4) 
bundler (1.5.3) 
bundler-unload (1.0.2) 
executable-hooks (1.3.1) 
gem-wrappers (1.2.4) 
io-console (0.4.2) 
json (1.8.1) 
minitest (4.7.5) 
psych (2.0.3) 
rake (10.1.0) 
rdoc (4.1.0) 
rubygems-bundler (1.4.2) 
rvm (1.11.3.9) 
test-unit (2.1.1.0) 

如果我運行安裝包或包裝捆綁安裝它說,所有的寶石都安裝。

我在這裏錯過了什麼?

--------------------編輯------------------

找到了一種方法使它工作

我跟着trouble shooting guide,並試圖 RAILS_ENV=production bundle exec rails generate --help和它的工作

顯然是說在最後的評論hererb-inotify被「標記爲開發依賴」因此迫使環境中生產,它贏得試着用它

回答

0

要解決 'require': cannot load such file -- rb-inotify

您需要安裝rb-inotify gem。使用下面的命令來安裝它:

gem install rb-inotify 
+0

感謝您的回答,但不幸的是它沒有幫助。 我還是得到了同樣的錯誤,並且gem rb-inotify安裝在gemset上 –

+0

當你做'gem list'時,你看到它嗎? –

+0

是:RB-的inotify(0.9.3) –

0

,就把這行中的Gemfile

gem 'rb-inotify' 

,並給bundle install然後 請給在終端gem list

如果有手段解決這個問題,需要此寶石application.rb一樣,

require "rb-inotify" 

這個問題會解決的。

+0

我在application.rb中添加了'require'「rb-inotify」,現在它給出了一個不同的錯誤 /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/ activesupport-4.0.3/lib/active_support/dependencies.rb:229:在'require'中:無法加載這樣的文件 - rb-inotify(LoadError) –

+0

確定你的gemset中有'rb-inotify' gem意思是你的gemset沒有正確加載。代替'rvm'請嘗試http://stackoverflow.com/questions/15708916/use-rvmrc-or-ruby-version-file-to-set-a-project-gemset-with-rvm#answers – Jenorish