简体   繁体   English

为什么Rails作曲家只能创建没有功能的基本应用程序? 'open_http':找不到404(OpenURI :: HTTPError)

[英]Why is Rails composer only creating a basic app without features? `open_http': 404 Not Found (OpenURI::HTTPError)

I have just completed the detailed and well-explained Rails tutorial by Daniel Kehoe and am at the end trying to experiment with Rails Composer. 我刚刚完成了Daniel Kehoe撰写的详尽且经过充分说明的Rails教程,最后尝试使用Rails Composer进行实验。 I am having a problem creating the app on both Cloud 9 and Windows 10 with the same error. 我在Cloud 9和Windows 10上创建应用程序时遇到问题,并出现相同的错误。 The app creates but only a basic rails app and not the Rails composer app with all the extra features. 该应用程序仅创建一个基本的Rails应用程序,而不创建具有所有其他功能的Rails Composer应用程序。

First I tried to create the new project with the following command: 首先,我尝试使用以下命令创建新项目:

rails new rails-devise-roles -m https://raw.github.com/RailsApps/rails-composer/master/composer

and got the following error: 并得到以下错误:

C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/open-uri.rb:358:in `open_http': 404 Not Found (OpenURI::HTTPError)

I have tried to find line 358 in this file but in the directory C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0 there appears to be no "open-uri.rb" file to inspect. 我试图在此文件中找到第358行,但是在目录C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0中,似乎没有要检查的“ open-uri.rb”文件。

Below is the full app creation command with result: 以下是完整的应用程序创建命令及其结果:

C:\>rails new rails-devise-roles -m https://raw.github.com/RailsApps/rails-composer/master/composer
      create
      create  README.md
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
         run  git init from "."
Initialized empty Git repository in C:/rails-devise-roles/.git/
      create  app
      create  app/assets/config/manifest.js
      create  app/assets/javascripts/application.js
      create  app/assets/javascripts/cable.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/.keep
      create  app/assets/javascripts/channels
      create  app/assets/javascripts/channels/.keep
      create  app/controllers/concerns/.keep
      create  app/models/concerns/.keep
      create  bin
      create  bin/bundle
      create  bin/rails
      create  bin/rake
      create  bin/setup
      create  bin/update
      create  bin/yarn
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/secrets.yml
      create  config/cable.yml
      create  config/puma.rb
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/application_controller_renderer.rb
      create  config/initializers/assets.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/cookies_serializer.rb
      create  config/initializers/cors.rb
      create  config/initializers/filter_parameter_logging.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/new_framework_defaults_5_1.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      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  test/fixtures
      create  test/fixtures/.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/test_helper.rb
      create  test/system
      create  test/system/.keep
      create  test/application_system_test_case.rb
      create  tmp
      create  tmp/.keep
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor
      create  vendor/.keep
      create  package.json
      remove  config/initializers/cors.rb
      remove  config/initializers/new_framework_defaults_5_1.rb
       apply  https://raw.github.com/RailsApps/rails-composer/master/composer
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/open-uri.rb:358:in `open_http': 404 Not Found (OpenURI::HTTPError)
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/open-uri.rb:209:in `catch'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/open-uri.rb:716:in `open'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/open-uri.rb:34:in `open'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/actions.rb:220:in `apply'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.1.5/lib/rails/generators/app_base.rb:162:in `apply_rails_template'
        from (eval):1:in `apply_rails_template'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in `block in invoke_all'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in `each'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in `map'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in `invoke_all'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/group.rb:232:in `dispatch'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.1.5/lib/rails/commands/application/application_command.rb:24:in `perform'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.1.5/lib/rails/command/base.rb:63:in `perform'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.1.5/lib/rails/command.rb:44:in `invoke'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.1.5/lib/rails/cli.rb:16:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.1.5/exe/rails:9:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/bin/rails:23:in `load'
        from C:/RailsInstaller/Ruby2.2.0/bin/rails:23:in `<main>'

Your endpoint is not reachable, try: 您的端点无法访问,请尝试:

rails new rails-devise-roles -m https://raw.githubusercontent.com/RailsApps/rails-composer/master/composer.rb

But if that doesn't work, just download the ruby code locally from the raw file and just point to the local rb file. 但是,如果那行不通,只需从原始文件本地下载ruby代码,然后指向本地rb文件即可。

in your terminal: 在您的终端中:

curl -O https://raw.githubusercontent.com/RailsApps/rails-composer/master/composer.rb

rails new rails-devise-roles -m composer.rb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Rails open_uri和Amazon s3`open_http&#39;:禁止使用403(OpenURI :: HTTPError) - Rails open_uri and amazon s3 `open_http': 403 Forbidden (OpenURI::HTTPError) 使用Rails,HTTParty和Paperclip的“OpenURI :: HTTPError:401 Unauthorized” - “OpenURI::HTTPError: 401 Unauthorized” with Rails, HTTParty, and Paperclip OpenURI::HTTPError(500 内部服务器错误)与 open-uri - OpenURI::HTTPError (500 Internal Server Error) with open-uri OpenURI :: HTTPError:403 Forbidden - OpenURI::HTTPError: 403 Forbidden OpenURI :: HTTPError(420未使用): - OpenURI::HTTPError (420 unused): ElasticBeanstalk和Rails - 部署应用程序,但只获得404 Not Found nginx / 1.4.3 - ElasticBeanstalk and Rails - Deploying app but only getting 404 Not Found nginx/1.4.3 Rails和OpenURI - Rails and OpenURI OpenURI::HTTPError 403 Forbidden - 打开存储在 S3 上的资产的回形针 url (fog gem) - OpenURI::HTTPError 403 Forbidden - open paperclip url for asset stored on S3 (fog gem) Rails填充数据库耙任务OpenURI :: HTTPError:500内部服务器错误 - Rails populate db rake task OpenURI::HTTPError: 500 Internal Server Error Rails应用程序:Solr抛出RSolr :: Error :: Http - 执行搜索时找不到404 - Rails app: Solr throwing RSolr::Error::Http - 404 Not Found when executing search
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM