gpt4 book ai didi

ruby-on-rails-4 - 尝试在 Ubuntu 14.04 上启动 Webrick 时出错

转载 作者:行者123 更新时间:2023-12-01 15:00:43 26 4
gpt4 key购买 nike

这是我在使用“rails 服务器”时得到的输出

尝试通过 Google 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>'

最佳答案

您用来启动 webrick 的用户无权在 /home/ubuntu/tracks 文件夹下创建目录。

请确保您是 ubuntu 或具有与 ubuntu 相同权限的用户。

你也可以简单地做:

sudo su
su ubuntu

你的 shell 将是 ubuntu

关于ruby-on-rails-4 - 尝试在 Ubuntu 14.04 上启动 Webrick 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27317783/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com