linux - Permission denied when generating a rails controllers -
i'm using vps ubuntu trying rails generate controller keep getting weird permissions error listed below, , when try use "sudo rails generate" says command can't found, ideas?
/home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:252:in `mkdir': permission denied @ dir_s_mkdir - /run/user/0/spring (errno::eacces) /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:252:in `fu_mkdir' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:226:in `block (2 levels) in mkdir_p' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:224:in `reverse_each' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:224:in `block in mkdir_p' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:210:in `each' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/fileutils.rb:210:in `mkdir_p' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/lib/spring/env.rb:37:in `tmp_path' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/lib/spring/env.rb:54:in `pidfile_path' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/lib/spring/env.rb:69:in `server_running?' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/lib/spring/client/run.rb:25:in `call' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/lib/spring/client/command.rb:7:in `call' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/lib/spring/client/rails.rb:24:in `call' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/lib/spring/client/command.rb:7:in `call' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/lib/spring/client.rb:26:in `run' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/bin/spring:48:in `<top (required)>' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/lib/spring/binstub.rb:11:in `load' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.3.4/lib/spring/binstub.rb:11:in `<top (required)>' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' /home/katgus/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' /home/katgus/appname/bin/spring:13:in `<top (required)>' bin/rails:3:in `load' bin/rails:3:in `<main>'
the command rails installed rbenv user on /home/katgus/.rbenv
. when run "sudo rails generate"
not using user environment. have error.
the best way fix permission problem user can create dirs.
Comments
Post a Comment