2011-07-29 25 views
2
1. Install Ruby on Rails 

sudo gem install rails 
2. Install the Juggernaut Gem 

sudo gem install juggernaut 
3. Download the demo app and unpack it. 

4. Start the Rails application 

ruby script/server 
5. Start the Juggernaut server 

juggernaut -c juggernaut.yml 
6. Open the browser and go to http://localhost:3000 

「需要」劍聖/紅寶石問題,但我的電腦顯得那麼有每一個劍聖應用問題。我安裝了ruby,安裝了juggernaut,並從github克隆了git的應用程序。然後我cdd目錄並嘗試rails s。我「沒有別的搶救也沒用」整個上午我試圖遵循這些簡單的說明在Mac 10.6

Usage: 
    rails new APP_PATH [options] 

Options: 
    -r, [--ruby=PATH]   # Path to the Ruby binary of your choice 
           # Default: /Users/fred/.rvm/rubies/ruby-1.9.2-p180/bin/ruby 
    -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db) 
           # Default: sqlite3 
    -b, [--builder=BUILDER]  # Path to an application builder (can be a filesystem path or URL) 
    -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) 
     [--dev]     # Setup the application with Gemfile pointing to your Rails checkout 
     [--edge]    # Setup the application with Gemfile pointing to Rails repository 
     [--skip-gemfile]  # Don't create a Gemfile 
    -O, [--skip-active-record] # Skip Active Record files 
    -T, [--skip-test-unit]  # Skip Test::Unit files 
    -J, [--skip-prototype]  # Skip Prototype files 
    -G, [--skip-git]   # Skip Git ignores and keeps 

Runtime options: 
    -f, [--force] # Overwrite files that already exist 
    -p, [--pretend] # Run but do not make any changes 
    -q, [--quiet] # Supress status output 
    -s, [--skip]  # Skip files that already exist 

Rails options: 
    -v, [--version] # Show Rails version number and quit 
    -h, [--help]  # Show this help message and quit 

Description: 
    The 'rails new' command creates a new Rails application with a default 
    directory structure and configuration at the path you specify. 

Example: 
    rails new ~/Code/Ruby/weblog 

    This generates a skeletal Rails installation in ~/Code/Ruby/weblog. 
    See the README in the newly created application to get going. 

我又試圖juggernaut -c juggernaut.yml並獲得

/Users/fred/.rvm/gems/ruby-1.9.2-p180/gems/maccman-juggernaut-0.5.9/lib/juggernaut/server.rb:128: warning: else without rescue is useless 
/Users/fred/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require': /Users/fred/.rvm/gems/ruby-1.9.2-p180/gems/maccman-juggernaut-0.5.9/lib/juggernaut/server.rb:122: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError) 
     when :broadcast: broadcast_command 
         ^
/Users/fred/.rvm/gems/ruby-1.9.2-p180/gems/maccman-juggernaut-0.5.9/lib/juggernaut/server.rb:363: syntax error, unexpected keyword_end, expecting $end 
    from /Users/fred/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require' 
    from /Users/fred/.rvm/gems/ruby-1.9.2-p180/gems/maccman-juggernaut-0.5.9/lib/juggernaut.rb:157:in `<top (required)>' 
    from /Users/fred/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require' 
    from /Users/fred/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require' 
    from /Users/fred/.rvm/gems/ruby-1.9.2-p180/gems/maccman-juggernaut-0.5.9/bin/juggernaut:3:in `<top (required)>' 
    from /Users/fred/.rvm/gems/ruby-1.9.2-p180/bin/juggernaut:19:in `load' 
    from /Users/fred/.rvm/gems/ruby-1.9.2-p180/bin/juggernaut:19:in `<main>' 

是否有人可以幫助我。順便說一句,任何非juggernaut rails應用程序都可以在我的電腦上正常工作。

+3

我知道你很不高興..但也許你應該改變標題到更爲相關的問題 –

+0

對不起,我改了標題,但是你知道如何解決這些問題嗎? – user852974

+0

'否則沒有救援是無用的'?也許再試一次標題? – diedthreetimes

回答

0

我對centos有類似的問題。這可能發生,如果創業板設置不正確(不知道是什麼東西,但使用sudo做)

嘗試運行它捆綁 bundle exec rails s

0

內我有這個錯誤'warning: else without rescue is useless'具有完全不同的東西。

它是一個奇怪的,但一旦我看到你如何產生錯誤,我發現了問題並修復了它。

http://nofail.de/2011/12/ruby-quirks/

創業板或添加的代碼基本上什麼地方,你有一個畸形if聲明。

奇怪的是,除了一個開發人員之外,這個錯誤並沒有引起問題。這種畸形的if使它生產,似乎工作。在他的開發箱上會標記錯誤,然後進行非法指導並死亡。

相關問題