I created a simple "hello world" rails app according to a tutorial I found
online. everything went ok.
Today I want to create a simple rails blog app. So I installed sqlite3
database. Now when I run the rails command to create the directory
structure for the new app it fails ( I have tried this both with and
without specifying the rails version number and the result is the same
error).
I am running windows 10
rails version = 5.2.3
ruby version = ruby 2.6.0p0 (2018-12-25 revision 66547) [x64-mingw32]
The error trace is as follows:
C:\barry\ruby\environment>rails _5.2.3_ new blog
create
create README.md
create Rakefile
create .ruby-version
create config.ru
create .gitignore
create Gemfile
run git init from "."
Initialized empty Git repository in C:/barry/ruby/environment/blog/.git/
create package.json
create app
Traceback (most recent call last):
42: from C:/ruby/bin/rails:23:in `<main>'
41: from C:/ruby/bin/rails:23:in `load'
40: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/exe/rails:10:in `<top
(required)>'
39: from
C:/Ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
38: from
C:/Ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
37: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/cli.rb:18:in
`<top (required)>'
36: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/command.rb:46:in
`invoke'
35: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in
`perform'
34: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
33: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
`invoke_command'
32: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
31: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands/application/application_command.rb:26:in
`perform'
30: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
29: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/group.rb:232:in
`dispatch'
28: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:133:in
`invoke_all'
27: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:133:in
`map'
26: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:133:in
`each'
25: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:133:in
`block in invoke_all'
24: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
`invoke_command'
23: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
22: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/generators/rails/app/app_generator.rb:301:in
`crea
te_app_files'
21: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/generators/app_base.rb:159:in
`build'
20: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/generators/rails/app/app_generator.rb:81:in
`app'
19: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/generators/rails/app/app_generator.rb:19:in
`direc
tory'
18: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb:52:in
`directory'
17: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions.rb:94:in
`action'
16: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb:66:in
`invoke!'
15: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb:80:in
`execute!'
14: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb:80:in
`each'
13: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb:92:in
`block in execute!'
12: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/file_manipulation.rb:122:in
`template'
11: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/create_file.rb:25:in
`create_file'
10: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions.rb:94:in
`action'
9: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/create_file.rb:60:in
`invoke!'
8: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/empty_directory.rb:117:in
`invoke_with_conflic
t_check'
7: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/create_file.rb:62:in
`block in invoke!'
6: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:200:in `mkdir_p'
5: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:200:in `each'
4: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:215:in `block in
mkdir_p'
3: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:215:in `reverse_each'
2: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:217:in `block (2
levels) in mkdir_p'
1: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:239:in `fu_mkdir'
C:/Ruby/lib/ruby/2.6.0/fileutils.rb:239:in `mkdir': Invalid argument @
dir_s_mkdir - C:/barry/ruby/environment/blog/app/C: (E
rrno::EINVAL)
C:\barry\ruby\environment>
···
-----
According to the end of the error trace it would seem it is attempting to
create a directory named "C:". Why would it do that ?
Any ideas to how I can fix this error ?
Thanks.
==================
Barry Kimelman
Winnipeg, Manitoba, Canada
Feeling frustrated, I rebooted my windows 10 laptop and went for a walk.
After I got back and once again tried the "rails new" command, it worked !!!
Curious as to why a simple reboot fixed the issue !!
<Safe emailing Mac | Avast;
Virus-free.
www.avast.com
<Safe emailing Mac | Avast;
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
···
On Fri, Jul 26, 2019 at 9:10 PM Daniel Tinivella <dtinivella@gmail.com> wrote:
Hello Barry ,
do you have nodejs install on windows 10 ?
you can copy and paste here[*] the complete error and send it to me
if you can't solve it , we make a hangouts and we see it
* https://www.codepile.net/pile/vy0NDx2Y
Cheers
Daniel Tinivella
El vie., 26 jul. 2019 a las 16:28, Barry Kimelman (< > crhistopher.pike@gmail.com>) escribió:
I created a simple "hello world" rails app according to a tutorial I
found online. everything went ok.
Today I want to create a simple rails blog app. So I installed sqlite3
database. Now when I run the rails command to create the directory
structure for the new app it fails ( I have tried this both with and
without specifying the rails version number and the result is the same
error).
I am running windows 10
rails version = 5.2.3
ruby version = ruby 2.6.0p0 (2018-12-25 revision 66547) [x64-mingw32]
The error trace is as follows:
C:\barry\ruby\environment>rails _5.2.3_ new blog
create
create README.md
create Rakefile
create .ruby-version
create config.ru
create .gitignore
create Gemfile
run git init from "."
Initialized empty Git repository in C:/barry/ruby/environment/blog/.git/
create package.json
create app
Traceback (most recent call last):
42: from C:/ruby/bin/rails:23:in `<main>'
41: from C:/ruby/bin/rails:23:in `load'
40: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/exe/rails:10:in `<top
(required)>'
39: from
C:/Ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
38: from
C:/Ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
`require'
37: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/cli.rb:18:in
`<top (required)>'
36: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/command.rb:46:in
`invoke'
35: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in
`perform'
34: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
33: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
`invoke_command'
32: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
31: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/commands/application/application_command.rb:26:in
`perform'
30: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
29: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/group.rb:232:in
`dispatch'
28: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:133:in
`invoke_all'
27: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:133:in
`map'
26: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:133:in
`each'
25: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:133:in
`block in invoke_all'
24: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
`invoke_command'
23: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
22: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/generators/rails/app/app_generator.rb:301:in
`crea
te_app_files'
21: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/generators/app_base.rb:159:in
`build'
20: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/generators/rails/app/app_generator.rb:81:in
`app'
19: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/generators/rails/app/app_generator.rb:19:in
`direc
tory'
18: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb:52:in
`directory'
17: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions.rb:94:in
`action'
16: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb:66:in
`invoke!'
15: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb:80:in
`execute!'
14: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb:80:in
`each'
13: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb:92:in
`block in execute!'
12: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/file_manipulation.rb:122:in
`template'
11: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/create_file.rb:25:in
`create_file'
10: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions.rb:94:in
`action'
9: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/create_file.rb:60:in
`invoke!'
8: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/empty_directory.rb:117:in
`invoke_with_conflic
t_check'
7: from
C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/actions/create_file.rb:62:in
`block in invoke!'
6: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:200:in `mkdir_p'
5: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:200:in `each'
4: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:215:in `block in
mkdir_p'
3: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:215:in `reverse_each'
2: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:217:in `block (2
levels) in mkdir_p'
1: from C:/Ruby/lib/ruby/2.6.0/fileutils.rb:239:in `fu_mkdir'
C:/Ruby/lib/ruby/2.6.0/fileutils.rb:239:in `mkdir': Invalid argument @
dir_s_mkdir - C:/barry/ruby/environment/blog/app/C: (E
rrno::EINVAL)
C:\barry\ruby\environment>
-----
According to the end of the error trace it would seem it is attempting to
create a directory named "C:". Why would it do that ?
Any ideas to how I can fix this error ?
Thanks.
==================
Barry Kimelman
Winnipeg, Manitoba, Canada
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
--
==================
Barry Kimelman
Winnipeg, Manitoba, Canada
<Safe emailing Mac | Avast;
Virus-free.
www.avast.com
<Safe emailing Mac | Avast;
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>