Rails 错误"unset"未被识别为内部或外部命令



我正在尝试使用kickoff_tailwind创建新的rails应用程序

首先,我运行rails new tweeter -m template.rb -j esbuild并使rails应用程序得到输出

$  rails new tweeter -m template.rb -j esbuild
create
create  README.md
create  Rakefile
create  .ruby-version
create  config.ru
create  .gitignore
create  .gitattributes
create  Gemfile
run  git init from "."
Initialized empty Git repository in F:/kickoff_tailwind-main/kickoff_tailwind-main/tweeter/.git/
create  app
create  app/assets/config/manifest.js
create  app/assets/stylesheets/application.css
create  app/channels/application_cable/channel.rb
create  app/channels/application_cable/connection.rb
create  app/controllers/application_controller.rb
create  app/helpers/application_helper.rb
create  app/jobs/application_job.rb
create  app/mailers/application_mailer.rb
create  app/models/application_record.rb
create  app/views/layouts/application.html.erb
create  app/views/layouts/mailer.html.erb
create  app/views/layouts/mailer.text.erb
create  app/assets/images
create  app/assets/images/.keep
create  app/controllers/concerns/.keep
create  app/models/concerns/.keep
create  bin
create  bin/rails
create  bin/rake
create  bin/setup
create  config
create  config/routes.rb
create  config/application.rb
create  config/environment.rb
create  config/cable.yml
create  config/puma.rb
create  config/storage.yml
create  config/environments
create  config/environments/development.rb
create  config/environments/production.rb
create  config/environments/test.rb
create  config/initializers
create  config/initializers/assets.rb
create  config/initializers/content_security_policy.rb
create  config/initializers/cors.rb
create  config/initializers/filter_parameter_logging.rb
create  config/initializers/inflections.rb
create  config/initializers/new_framework_defaults_7_0.rb
create  config/initializers/permissions_policy.rb
create  config/locales
create  config/locales/en.yml
create  config/master.key
append  .gitignore
create  config/boot.rb
create  config/database.yml
create  db
create  db/seeds.rb
create  lib
create  lib/tasks
create  lib/tasks/.keep
create  lib/assets
create  lib/assets/.keep
create  log
create  log/.keep
create  public
create  public/404.html
create  public/422.html
create  public/500.html
create  public/apple-touch-icon-precomposed.png
create  public/apple-touch-icon.png
create  public/favicon.ico
create  public/robots.txt
create  tmp
create  tmp/.keep
create  tmp/pids
create  tmp/pids/.keep
create  tmp/cache
create  tmp/cache/assets
create  vendor
create  vendor/.keep
create  test/fixtures/files
create  test/fixtures/files/.keep
create  test/controllers
create  test/controllers/.keep
create  test/mailers
create  test/mailers/.keep
create  test/models
create  test/models/.keep
create  test/helpers
create  test/helpers/.keep
create  test/integration
create  test/integration/.keep
create  test/channels/application_cable/connection_test.rb
create  test/test_helper.rb
create  test/system
create  test/system/.keep
create  test/application_system_test_case.rb
create  storage
create  storage/.keep
create  tmp/storage
create  tmp/storage/.keep
remove  config/initializers/cors.rb
remove  config/initializers/new_framework_defaults_7_0.rb
apply  F:/kickoff_tailwind-main/kickoff_tailwind-main/template.rb
gemfile    devise (~> 4.8, >= 4.8.1)
gemfile    friendly_id (~> 5.4, >= 5.4.2)
gemfile    cssbundling-rails
gemfile    name_of_person
gemfile    sidekiq (~> 6.5, >= 6.5.4)
gemfile    stripe
run  bundle install
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies.........
Using rake 13.0.6
Using concurrent-ruby 1.1.10
Using minitest 5.17.0
Using builder 3.2.4
Using erubi 1.12.0
Using racc 1.6.2
Using crass 1.0.6
Using rack 2.2.5
Using nio4r 2.5.8
Using websocket-extensions 0.1.5
Using marcel 1.0.2
Using mini_mime 1.1.2
Using date 3.3.3
Using timeout 0.3.1
Using public_suffix 5.0.1
Using bcrypt 3.1.18
Using bindex 0.8.1
Using bundler 2.3.25
Using msgpack 1.6.0
Using matrix 0.4.2
Using regexp_parser 2.6.1
Fetching connection_pool 2.3.0
Using method_source 1.0.0
Using thor 1.2.1
Using zeitwerk 2.6.6
Using io-console 0.6.0
Using orm_adapter 0.5.0
Using rexml 3.2.5
Fetching redis 4.8.0
Using rubyzip 2.3.2
Using websocket 1.2.9
Using sqlite3 1.5.4 (x64-mingw-ucrt)
Using i18n 1.12.0
Fetching stripe 8.0.0
Using tzinfo 2.0.5
Using websocket-driver 0.7.5
Using nokogiri 1.13.10 (x64-mingw-ucrt)
Using rack-test 2.0.2
Using warden 1.2.9
Using sprockets 4.2.0
Using puma 5.6.5
Using net-protocol 0.2.1
Using addressable 2.8.1
Using bootsnap 1.15.0
Using reline 0.3.2
Using tzinfo-data 1.2022.7
Using loofah 2.19.1
Using xpath 3.2.0
Using net-imap 0.3.4
Using net-pop 0.1.2
Using net-smtp 0.3.3
Using selenium-webdriver 4.7.1
Using capybara 3.38.0
Using activesupport 7.0.4
Using rails-html-sanitizer 1.4.4
Using irb 1.6.2
Using rails-dom-testing 2.0.3
Using globalid 1.0.0
Using activemodel 7.0.4
Using name_of_person 1.1.1
Using debug 1.7.1
Using actionview 7.0.4
Using activejob 7.0.4
Using mail 2.8.0
Using webdrivers 5.2.0
Using actionpack 7.0.4
Using jbuilder 2.11.5
Using actioncable 7.0.4
Using actionmailer 7.0.4
Using railties 7.0.4
Using sprockets-rails 3.4.2
Using responders 3.0.1
Using jsbundling-rails 1.1.1
Using stimulus-rails 1.2.1
Using turbo-rails 1.3.2
Fetching cssbundling-rails 1.1.2
Using activerecord 7.0.4
Using web-console 4.2.0
Using devise 4.8.1
Using activestorage 7.0.4
Fetching friendly_id 5.5.0
Using actionmailbox 7.0.4
Using actiontext 7.0.4
Using rails 7.0.4
Installing cssbundling-rails 1.1.2
Installing connection_pool 2.3.0
Installing friendly_id 5.5.0
Installing redis 4.8.0
Installing stripe 8.0.0
Fetching sidekiq 6.5.8
Installing sidekiq 6.5.8
Bundle complete! 21 Gemfile dependencies, 85 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
run  bundle binstubs bundler
rails  javascript:install:esbuild
Compile into app/assets/builds
create  app/assets/builds
create  app/assets/builds/.keep
append  app/assets/config/manifest.js
append  .gitignore
append  .gitignore
Add JavaScript include tag in application layout
insert  app/views/layouts/application.html.erb
Create default entrypoint in app/javascript/application.js
create  app/javascript
create  app/javascript/application.js
Add default package.json
create  package.json
Add default Procfile.dev
create  Procfile.dev
Ensure foreman is installed
run  gem install foreman from "."
Successfully installed foreman-0.87.2
Parsing documentation for foreman-0.87.2
Done installing documentation for foreman after 2 seconds
1 gem installed
Add bin/dev to start foreman
create  bin/dev
Install esbuild
run  yarn add esbuild from "."
yarn add v1.22.19
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
└─ esbuild@0.16.14
info All dependencies
├─ @esbuild/win32-x64@0.16.14
└─ esbuild@0.16.14
Done in 10.41s.
Add build script
run  npm pkg set scripts.build="esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets" from "."
run  yarn build from "."
yarn run v1.22.19
$ esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets
X [ERROR] Could not resolve "app/javascript/*.*"
It looks like you are trying to use glob syntax (i.e. "*") with esbuild. This syntax is typically handled by your shell, and isn't handled by esbuild itself. You must expand glob syntax first before passing your paths to esbuild.
1 error
node:child_process:910
throw err;
^
Error: Command failed: F:kickoff_tailwind-mainkickoff_tailwind-maintweeternode_modules@esbuildwin32-x64esbuild.exe app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets
at checkExecSyncError (node:child_process:871:11)
at Object.execFileSync (node:child_process:907:15)
at Object.<anonymous> (F:kickoff_tailwind-mainkickoff_tailwind-maintweeternode_modulesesbuildbinesbuild:215:28)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 17592,
stdout: null,
stderr: null
}

ill be replaced by CRLF the next time Git touches it
warning: in the working copy of '.ruby-version', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'Gemfile', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'Gemfile.lock', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'Procfile.dev', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'README.md', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'Rakefile', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/assets/config/manifest.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/assets/stylesheets/actiontext.css', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/assets/stylesheets/application.tailwind.css', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/channels/application_cable/channel.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/channels/application_cable/connection.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/controllers/application_controller.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/controllers/home_controller.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/helpers/application_helper.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/javascript/application.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/javascript/controllers/application.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/javascript/controllers/hello_controller.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/javascript/controllers/index.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/jobs/application_job.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/mailers/application_mailer.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/models/application_record.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/models/user.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/active_storage/blobs/_blob.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/_auth_layout.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/confirmations/new.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/mailer/confirmation_instructions.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/mailer/email_changed.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/mailer/password_change.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/mailer/reset_password_instructions.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/mailer/unlock_instructions.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/passwords/edit.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/passwords/new.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/registrations/edit.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/registrations/new.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/sessions/new.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/shared/_error_messages.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/shared/_links.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/devise/unlocks/new.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/home/index.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/layouts/action_text/contents/_content.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/layouts/application.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/layouts/mailer.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/layouts/mailer.text.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/shared/_flash_notice.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/shared/_head.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/views/shared/_navbar.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'bin/bundle', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'bin/bundle.cmd', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'bin/dev', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'bin/rails', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'bin/rake', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'bin/setup', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config.ru', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/application.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/boot.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/cable.yml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/database.yml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/environment.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/environments/development.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/environments/production.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/environments/test.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/initializers/assets.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/initializers/content_security_policy.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/initializers/devise.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/initializers/filter_parameter_logging.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/initializers/friendly_id.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/initializers/inflections.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/initializers/permissions_policy.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/locales/devise.en.yml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/locales/en.yml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/puma.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/routes.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'config/storage.yml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'db/migrate/20230104203334_create_active_storage_tables.active_storage.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'db/migrate/20230104203357_create_action_text_tables.action_text.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'db/migrate/20230104203428_devise_create_users.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'db/migrate/20230104203445_create_friendly_id_slugs.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'db/seeds.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'lib/templates/erb/scaffold/_form.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'lib/templates/erb/scaffold/edit.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'lib/templates/erb/scaffold/index.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'lib/templates/erb/scaffold/new.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'lib/templates/erb/scaffold/show.html.erb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'package.json', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'public/404.html', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'public/422.html', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'public/500.html', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'public/robots.txt', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'tailwind.config.js', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'test/application_system_test_case.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'test/channels/application_cable/connection_test.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'test/fixtures/action_text/rich_texts.yml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'test/fixtures/users.yml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'test/models/user_test.rb', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'test/test_helper.rb', LF will be replaced by CRLF the next time Git touches it

Kickoff app successfully created! 👍
Switch to your app by running:
$ cd tweeter
Then run:
$ ./bin/dev

上面的代码我删除了一些常见的部分,因为在这里我只能超过30000字/然后我运行。bin/dev但是出现了错误,它说,

$ ./bin/dev
23:36:15 web.1  | started with pid 2372
23:36:15 js.1   | started with pid 9768
23:36:15 css.1  | started with pid 19132
23:36:15 web.1  | 'unset' is not recognized as an internal or external command,
23:36:15 web.1  | operable program or batch file.
23:36:15 web.1  | exited with code 1
23:36:15 system | sending SIGTERM to all processes
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:201:in `kill': Invalid argument (Errno::EINVAL)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:201:in `kill_children'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:473:in `terminate_gracefully'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:439:in `wait_for_shutdown_or_child_termination'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:60:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/cli.rb:42:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/command.rb:27:in `run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor.rb:369:in `dispatch'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/base.rb:444:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/bin/foreman:7:in `<top (required)>'
from C:/Ruby31-x64/bin/foreman:32:in `load'
from C:/Ruby31-x64/bin/foreman:32:in `<main>'

有谁能告诉我我该怎么做吗谢谢

看起来esbuild失败了:

$ esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets
X [ERROR] Could not resolve "app/javascript/*.*"
It looks like you are trying to use glob syntax (i.e. "*") with esbuild. This syntax is typically handled by your shell, and isn't handled by esbuild itself. You must expand glob syntax first before passing your paths to esbuild.
1 error
node:child_process:910
throw err;
^

最新更新