2014-12-05 91 views
3

啓動的WEBrick這是輸出用的導軌上服務器「錯誤當試圖在Ubuntu 14.04

的頁面試圖通過谷歌Chrome瀏覽器訪問它時,它也不會加載,當我得到,這是一個虛擬機上

=> Booting WEBrick 
=> Rails 4.1.7 application starting in development on http: //0.0.0.0:3000 
=> Run `rails server -h` for more startup options 
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option) 
=> Ctrl-C to shutdown server 
Exiting 
/home/ubuntu/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/fileutils.rb:250:in `mkdir': Permission denied @ dir_s_mkdir - /home/ubuntu/tracks/tmp (Errno::EACCES) 
     from /home/ubuntu/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/fileutils.rb:250:in `fu_mkdir' 
     from /home/ubuntu/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/fileutils.rb:224:in `block (2 levels) in mkdir_p' 
     from /home/ubuntu/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/fileutils.rb:222:in `reverse_each' 
     from /home/ubuntu/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/fileutils.rb:222:in `block in mkdir_p' 
     from /home/ubuntu/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/fileutils.rb:208:in `each' 
     from /home/ubuntu/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/fileutils.rb:208:in `mkdir_p' 
     from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/railties-4.1.7/lib/rails/commands/server.rb:125:in `block in create_tmp_directories' 
     from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/railties-4.1.7/lib/rails/commands/server.rb:124:in `each' 
     from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/railties-4.1.7/lib/rails/commands/server.rb:124:in `create_tmp_directories' 
     from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/railties-4.1.7/lib/rails/commands/server.rb:66:in `start' 
     from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:81:in `block in server' 
     from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:76:in `tap' 
     from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:76:in `server' 
     from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:40:in `run_command!' 
     from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/railties-4.1.7/lib/rails/commands.rb:17:in `<top (required)>' 
     from bin/rails:10:in `require' 
     from bin/rails:10:in `<main>' 

回答

0

你使用啓動的WEBrick沒有權限創建/home/ubuntu/tracks文件夾下一個目錄的用戶。

確保您要麼是ubuntu要麼是擁有與ubuntu相同權限的用戶。

你也可以簡單地做:

sudo su 
su ubuntu 

而且你的shell會ubuntu