我是铁杆新手。
我收到的错误更像是rails 5 db:reset not working提到的错误,但这不是该问题的重复,因为接受的答案并不适用于我。
我理解db:reset涉及db:drop,我发现我无法做db:reset,然后我尝试了db:drop,发现我也做不到,这是更为根本,并给出了同样的错误。
我得到的错误是当我执行rails db:drop时。我得到Permission denied @ unlink_internal - C:/rubytest/blah2/db/development.sqlite3
如下所示
C:\rubytest>rails --version
Rails 5.1.4
C:\rubytest>
C:\rubytest>rails new blah2
...
C:\rubytest\blah2>bundle update
...
C:\rubytest\blah2>rails db:drop
Permission denied @ unlink_internal - C:/rubytest/blah2/db/development.sqlite3
Couldn't drop database 'db/development.sqlite3'
rails aborted!
Errno::EACCES: Permission denied @ unlink_internal - C:/rubytest/blah2/db/development.sqlite3
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:drop:_unsafe
(See full trace by running task with --trace)
C:\rubytest\blah2>
我在这个问题的顶部提到的链接中接受的答案建议(注意不要在生产环境中这样做)&#34;只需删除development.sqlite3和schema.rb文件并重新运行rake db:migrate&#34;
我没有必要停止使用rails服务器,因为我还没有启动它。我做了那个删除,并且rails db:migrate,然后尝试了db:drop并且仍然出错。
C:\rubytest\blah2>dir C:\rubytest\blah2\db
...
23/12/2017 10:07 PM 0 development.sqlite3
23/12/2017 10:06 PM 370 seeds.rb
..
C:\rubytest\blah2>
C:\rubytest\blah2>del C:\rubytest\blah2\db\development.sqlite3
C:\rubytest\blah2>dir C:\rubytest\blah2\db
23/12/2017 10:06 PM 370 seeds.rb
C:\rubytest\blah2>
C:\rubytest\blah2>rails db:migrate
C:\rubytest\blah2>dir C:\rubytest\blah2\db
23/12/2017 10:13 PM 5,120 development.sqlite3
23/12/2017 10:13 PM 786 schema.rb
23/12/2017 10:06 PM 370 seeds.rb
C:\rubytest\blah2>
然而我仍然得到错误
C:\rubytest\blah2>rails db:drop
Permission denied @ unlink_internal - C:/rubytest/blah2/db/development.sqlite3
Couldn't drop database 'db/development.sqlite3'
rails aborted!
Errno::EACCES: Permission denied @ unlink_internal - C:/rubytest/blah2/db/development.sqlite3
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:drop:_unsafe
(See full trace by running task with --trace)
C:\rubytest\blah2>
我也试过了rails db:reset rails_env=development
(我知道默认情况下是开发方式..)我尝试了rails db:reset rails_env=test
,如此处所提到的Errno::EACCES: Permission denied @ unlink_internal when running rake test:models但是没有区别
这看起来像一个未解决的错误https://github.com/rails/rails/issues/31589(打开但没有响应)和https://github.com/rails/rails/issues/27015(已关闭)
加
我在此处包含了两个来自进程监视器的日志示例,这可能暗示了该问题。我做了一个路径包含ruby的过滤器。
第一个日志,更小。
我在进程监视器中开始捕获事件,就在rails db:drop之前,我刚刚停止它。
C:\crp\aaa1>path
PATH=C:\Ruby24-x64\bin;C:\Program Files\nodejs
c:\crp>rails new aaa1
...
C:\crp\aaa1>rails db:drop
Permission denied @ unlink_internal - C:/crp/aaa1/db/development.sqlite3
Couldn't drop database 'db/development.sqlite3'
rails aborted!
Errno::EACCES: Permission denied @ unlink_internal - C:/crp/aaa1/db/development.sqlite3
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:drop:_unsafe
(See full trace by running task with --trace)
http://ge.tt/5DYspso2 Logfile1.csv(size-15KB)
Time of Day Process Name PID Operation Path Result Detail
56:43.1 cmd.exe 9476 RegOpenKey HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ruby.exe NAME NOT FOUND Desired Access: Query Value, Enumerate Sub Keys
56:43.1 cmd.exe 9476 RegOpenKey HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\ruby.exe NAME NOT FOUND Desired Access: Query Value
56:43.1 ruby.exe 1516 CreateFile C:\Windows\Prefetch\RUBY.EXE-A86B99A9.pf NAME NOT FOUND Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: None, AllocationSize: n/a
56:43.1 ruby.exe 1516 RegQueryValue HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Compatibility32\ruby NAME NOT FOUND Length: 172
56:43.3 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.3 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.3 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.3 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.3 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.4 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.4 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.4 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.4 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.4 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.5 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.5 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.5 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.5 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.5 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.5 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.5 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.6 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.6 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.6 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.6 ruby.exe 1516 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:43.8 ruby.exe 1516 RegOpenKey HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ruby.exe NAME NOT FOUND Desired Access: Query Value, Enumerate Sub Keys
56:43.9 ruby.exe 1516 RegOpenKey HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\ruby.exe NAME NOT FOUND Desired Access: Query Value
56:43.9 ruby.exe 12108 CreateFile C:\Windows\Prefetch\RUBY.EXE-A86B99A9.pf NAME NOT FOUND Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: None, AllocationSize: n/a
56:43.9 ruby.exe 12108 RegQueryValue HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Compatibility32\ruby NAME NOT FOUND Length: 172
56:44.0 ruby.exe 12108 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:44.1 ruby.exe 12108 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:44.3 ruby.exe 12108 RegOpenKey HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ShellCompatibility\Applications\ruby.exe NAME NOT FOUND Desired Access: Query Value, Enumerate Sub Keys
56:44.6 ruby.exe 12108 CreateFile C:\Users\harvey\.gem\ruby\2.4.0\ PATH NOT FOUND Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:44.6 ruby.exe 12108 CreateFile C:\Users\harvey\.gem\ruby\2.4.0\ PATH NOT FOUND Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:44.6 ruby.exe 12108 CreateFile C:\Users\harvey\.gem\ruby\2.4.0\ PATH NOT FOUND Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:44.9 ruby.exe 12108 CreateFile C:\Users\harvey\.gem\ruby NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\lib\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\vendor\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\assets\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\channels\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\controllers\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\controllers\concerns\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\helpers\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\jobs\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\mailers\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\models\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\models\concerns\bindex\cruby.rb PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\lib\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\vendor\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\assets\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\channels\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\controllers\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\controllers\concerns\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\helpers\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\jobs\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\mailers\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\models\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
56:59.9 ruby.exe 12108 CreateFile C:\crp\aaa1\app\models\concerns\bindex\cruby.so PATH NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
我在上面的日志中注意到的主要内容是很多&#34; PATH NOT FOUND&#34;。我不知道这是否正常。
我从不同的路径再次尝试,这次我的环境路径更长。我在命令行上仍然遇到相同的错误,虽然日志更长,我注意到有关共享冲突的错误,这可能不相关,因为在本文前面的日志中,我没有遇到此类共享冲突错误进程监视器日志,但仍然在命令行中获得了权限被拒绝错误。
C:\ rubytest \凸出\种皮
C:\rubytest\proj\testa>rails db:drop
Permission denied @ unlink_internal - C:/rubytest/proj/testa/db/development.sqlite3
Couldn't drop database 'db/development.sqlite3'
rails aborted!
Errno::EACCES: Permission denied @ unlink_internal - C:/rubytest/proj/testa/db/development.sqlite3
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:drop:_unsafe
(See full trace by running task with --trace)
日志很大 - 2MB - 我会在这里链接到它。
logfile2.csv http://ge.tt/9axXqso2
我将在这里包括最终结果
5:00:39.1378504 PM ruby.exe 896 UnlockFileSingle C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS Offset: 1,073,741,826, Length: 510
5:00:39.1382490 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\lib\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1383816 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\vendor\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1385064 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\app\assets\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1386275 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\app\channels\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1387511 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\app\controllers\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1388726 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\app\controllers\concerns\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1389937 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\app\helpers\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1391185 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\app\jobs\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1392371 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\app\mailers\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1393550 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\app\models\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1394740 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\app\models\concerns\pathname.rb NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1506563 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
5:00:39.1506850 PM ruby.exe 896 QueryBasicInformationFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS CreationTime: 7/03/2018 5:00:38 PM, LastAccessTime: 7/03/2018 5:00:38 PM, LastWriteTime: 7/03/2018 5:00:38 PM, ChangeTime: 7/03/2018 5:00:38 PM, FileAttributes: A
5:00:39.1507039 PM ruby.exe 896 CloseFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS
5:00:39.1507888 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\db\development.sqlite3 SHARING VIOLATION Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1510446 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
5:00:39.1510721 PM ruby.exe 896 QueryBasicInformationFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS CreationTime: 7/03/2018 5:00:38 PM, LastAccessTime: 7/03/2018 5:00:38 PM, LastWriteTime: 7/03/2018 5:00:38 PM, ChangeTime: 7/03/2018 5:00:38 PM, FileAttributes: A
5:00:39.1510939 PM ruby.exe 896 CloseFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS
5:00:39.1511788 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS Desired Access: Write Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
5:00:39.1512195 PM ruby.exe 896 SetBasicInformationFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS CreationTime: 1/01/1601 12:00:00 AM, LastAccessTime: 1/01/1601 12:00:00 AM, LastWriteTime: 1/01/1601 12:00:00 AM, ChangeTime: 1/01/1601 12:00:00 AM, FileAttributes: AN
5:00:39.1512766 PM ruby.exe 896 CloseFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS
5:00:39.1514227 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
5:00:39.1514490 PM ruby.exe 896 QueryBasicInformationFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS CreationTime: 7/03/2018 5:00:38 PM, LastAccessTime: 7/03/2018 5:00:38 PM, LastWriteTime: 7/03/2018 5:00:38 PM, ChangeTime: 7/03/2018 5:00:39 PM, FileAttributes: A
5:00:39.1514674 PM ruby.exe 896 CloseFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS
5:00:39.1515487 PM ruby.exe 896 CreateFile C:\rubytest\proj\testa\db\development.sqlite3 SHARING VIOLATION Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
5:00:39.1632663 PM ruby.exe 896 UnlockFileSingle C:\rubytest\proj\testa\log\development.log RANGE NOT LOCKED Offset: 0, Length: 4,294,967,295
5:00:39.1632971 PM ruby.exe 896 CloseFile C:\rubytest\proj\testa\log\development.log SUCCESS
5:00:39.1633911 PM ruby.exe 896 CloseFile C:\rubytest\proj\testa\db\development.sqlite3 SUCCESS
5:00:39.1648632 PM SearchIndexer.exe 4652 CreateFile C:\rubytest\proj\testa\db SUCCESS Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open By ID, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
5:00:39.1648915 PM SearchIndexer.exe 4652 QueryNameInformationFile C:\rubytest\proj\testa\db SUCCESS Name: \rubytest\proj\testa\db
5:00:39.1649125 PM SearchIndexer.exe 4652 CloseFile C:\rubytest\proj\testa\db SUCCESS
5:00:39.1649995 PM SearchIndexer.exe 4652 CreateFile C:\rubytest\proj\testa SUCCESS Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
5:00:39.1650336 PM SearchIndexer.exe 4652 QueryInformationVolume C:\rubytest\proj\testa SUCCESS VolumeCreationTime: 31/08/2013 3:20:40 AM, VolumeSerialNumber: B411-D580, SupportsObjects: True, VolumeLabel:
5:00:39.1650451 PM SearchIndexer.exe 4652 QueryAllInformationFile C:\rubytest\proj\testa BUFFER OVERFLOW CreationTime: 18/02/2018 9:48:00 PM, LastAccessTime: 18/02/2018 9:48:11 PM, LastWriteTime: 18/02/2018 9:48:11 PM, ChangeTime: 18/02/2018 9:48:11 PM, FileAttributes: D, AllocationSize: 4,096, EndOfFile: 4,096, NumberOfLinks: 1, DeletePending: False, Directory: True, IndexNumber: 0x280000000cdc2c, EaSize: 0, Access: Generic Read, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
5:00:39.1650574 PM SearchIndexer.exe 4652 CloseFile C:\rubytest\proj\testa SUCCESS
5:00:39.1652249 PM SearchIndexer.exe 4652 CreateFile C:\rubytest\proj SUCCESS Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
5:00:39.1652520 PM SearchIndexer.exe 4652 QueryInformationVolume C:\rubytest\proj SUCCESS VolumeCreationTime: 31/08/2013 3:20:40 AM, VolumeSerialNumber: B411-D580, SupportsObjects: True, VolumeLabel:
5:00:39.1652622 PM SearchIndexer.exe 4652 QueryAllInformationFile C:\rubytest\proj BUFFER OVERFLOW CreationTime: 16/02/2018 3:48:12 PM, LastAccessTime: 7/03/2018 4:48:01 PM, LastWriteTime: 7/03/2018 4:48:01 PM, ChangeTime: 7/03/2018 4:48:01 PM, FileAttributes: D, AllocationSize: 4,096, EndOfFile: 4,096, NumberOfLinks: 1, DeletePending: False, Directory: True, IndexNumber: 0x400000012fdb9, EaSize: 0, Access: Generic Read, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
5:00:39.1652737 PM SearchIndexer.exe 4652 CloseFile C:\rubytest\proj SUCCESS
5:00:39.1696011 PM ruby.exe 896 CloseFile C:\rubytest\proj\testa SUCCESS
5:00:39.1780143 PM ruby.exe 5800 CloseFile C:\rubytest\proj\testa SUCCESS
答案 0 :(得分:1)
这行做到了,rails db:drop:_unsafe
请参阅https://github.com/rails/rails/issues/31589
C:\rubytest\h\testaa1>rails db:drop:_unsafe
Dropped database 'db/development.sqlite3'
Dropped database 'db/test.sqlite3'
C:\rubytest\h\testaa1>