当我在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。