在 NTFS 分区上创建新的 Rails 应用程序时如何消除错误?
当我在 NTFS 分区上创建新的 Rails 应用程序时,我收到了一堆错误。不过,使用相同的配置,当我在位于 ext4 格式分区的主目录中创建项目时,我不会收到任何错误。
这是我得到的。
$ rails new project
create
create README
create Rakefile
[...]
create public/index.html
create public/robots.txt
create script
create script/rails
/home/user/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:1323:in `chmod': Operation not permitted - /media/ntfs/project/script (Errno::EPERM)
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:1323:in `chmod'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:996:in `block (2 levels) in chmod_R'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:1433:in `preorder_traverse'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:994:in `block in chmod_R'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:993:in `each'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:993:in `chmod_R'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:132:in `chmod'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators/rails/app/app_generator.rb:17:in `chmod'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators/rails/app/app_generator.rb:106:in `script'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators/app_base.rb:96:in `build'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators/rails/app/app_generator.rb:210:in `create_script_files'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands/application.rb:31:in `<top (required)>'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/cli.rb:15:in `<top (required)>'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/rails-3.1.3/bin/rails:7:in `<top (required)>'
from /home/john/.rvm/gems/ruby-1.9.3-p0/bin/rails:19:in `load'
from /home/john/.rvm/gems/ruby-1.9.3-p0/bin/rails:19:in `<main>'
我通过rvm安装了rails 3.1.3。
$ rvm list
rvm rubies
=> ruby-1.9.3-p0 [ x86_64 ]
ruby-1.9.2-p290 [ x86_64 ]
ruby-1.9.2-p180 [ x86_64 ]
这是我的一般配置。
$ rails -v
Rails 3.1.3
$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
$ rvm -v
rvm 1.9.2
$ bundle -v
Bundler version 1.0.21
$ gem -v
1.8.11
我使用 Ubuntu 10.10。
When I create a new rails application on my NTFS partition I receive a bunch of errors. Though, with the same configuration I do not get any error when I create the project in my home directory which sits on a ext4 formatted partition.
Here is what I get.
$ rails new project
create
create README
create Rakefile
[...]
create public/index.html
create public/robots.txt
create script
create script/rails
/home/user/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:1323:in `chmod': Operation not permitted - /media/ntfs/project/script (Errno::EPERM)
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:1323:in `chmod'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:996:in `block (2 levels) in chmod_R'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:1433:in `preorder_traverse'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:994:in `block in chmod_R'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:993:in `each'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/fileutils.rb:993:in `chmod_R'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:132:in `chmod'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators/rails/app/app_generator.rb:17:in `chmod'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators/rails/app/app_generator.rb:106:in `script'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators/app_base.rb:96:in `build'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/generators/rails/app/app_generator.rb:210:in `create_script_files'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands/application.rb:31:in `<top (required)>'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/cli.rb:15:in `<top (required)>'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/john/.rvm/gems/ruby-1.9.3-p0/gems/rails-3.1.3/bin/rails:7:in `<top (required)>'
from /home/john/.rvm/gems/ruby-1.9.3-p0/bin/rails:19:in `load'
from /home/john/.rvm/gems/ruby-1.9.3-p0/bin/rails:19:in `<main>'
I installed rails 3.1.3 via rvm.
$ rvm list
rvm rubies
=> ruby-1.9.3-p0 [ x86_64 ]
ruby-1.9.2-p290 [ x86_64 ]
ruby-1.9.2-p180 [ x86_64 ]
This is my general configuration.
$ rails -v
Rails 3.1.3
$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
$ rvm -v
rvm 1.9.2
$ bundle -v
Bundler version 1.0.21
$ gem -v
1.8.11
I work with Ubuntu 10.10.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论