在轨道上的ruby中创建myapp时权限被拒绝

时间:2016-11-25 10:58:14

标签: mysql ruby-on-rails ruby

作为第一次使用linux和ruby on rails,我正在遵循本指南,https://gorails.com/setup/windows/10在步骤工作正常,除了我尝试执行此命令时的最后一步。

  

rails new myapp -d mysql

点击enter后我收到了这条消息。

/home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/fileutils.rb:253:in `mkdir': Permission denied @ dir_s_mkdir - /myapp (Errno::EACCES)
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/fileutils.rb:253:in `fu_mkdir'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/fileutils.rb:227:in `block (2 levels) in mkdir_p'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/fileutils.rb:225:in `reverse_each'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/fileutils.rb:225:in `block in mkdir_p'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/fileutils.rb:211:in `each'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/fileutils.rb:211:in `mkdir_p'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:50:in `block in invoke!'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:49:in `invoke!'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:14:in `empty_directory'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/generators/app_base.rb:153:in `create_root'
        from (eval):1:in `create_root'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/application.rb:17:in `<top (required)>'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/cli.rb:14:in `<top (required)>'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
        from /home/fil/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/exe/rails:9:in `<top (required)>'
        from /home/fil/.rbenv/versions/2.3.3/bin/rails:22:in `load'
        from /home/fil/.rbenv/versions/2.3.3/bin/rails:22:in `<main>'

问题是什么?,你能提出解决方案吗?

0 个答案:

没有答案