Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 运行命令rails服务器时出现名称错误_Ruby On Rails_Ruby - Fatal编程技术网

Ruby on rails 运行命令rails服务器时出现名称错误

Ruby on rails 运行命令rails服务器时出现名称错误,ruby-on-rails,ruby,Ruby On Rails,Ruby,我是Ruby新手,正在学习Michael Hartl的教程。我还在读第一章 上面说 undefined local variable or method 'first_app' for main:Object (NameError) 这在我的开发中。rb第1行 Firstapp::Application.configure do # Settings specified here will take precedence over those in config/app

我是Ruby新手,正在学习Michael Hartl的教程。我还在读第一章

上面说

    undefined local variable or method 'first_app' for main:Object (NameError)
这在我的开发中。rb第1行

    Firstapp::Application.configure do
    # Settings specified here will take precedence over those in config/application.rb.

    # In the development environment your application's code is reloaded on
    # every request. This slows down response time but is perfect for development
    # since you don't have to restart the web server when you make code changes.
    config.cache_classes = false

    # Do not eager load code on boot.
    config.eager_load = false

    # Show full error reports and disable caching.
    config.consider_all_requests_local       = true
    config.action_controller.perform_caching = false

    # Don't care if the mailer can't send.
    config.action_mailer.raise_delivery_errors = false

    # Print deprecation notices to the Rails logger.
    config.active_support.deprecation = :log

    # Raise an error on page load if there are pending migrations.
    config.active_record.migration_error = :page_load

    # Debug mode disables concatenation and preprocessing of assets.
    # This option may cause significant delays in view rendering with a large
    # number of complex assets.
    config.assets.debug = true

    # Adds additional error checking when serving assets at runtime.
    # Checks for improperly declared sprockets dependencies.
    # Raises helpful error messages.
    config.assets.raise_runtime_errors = true

    # Raises error for missing translations
    # config.action_view.raise_on_missing_translations = true
    end
我跟进了StackOverflow的其他问题,但没有找到解决方案。他们中的一些人要求更改我的应用程序名称

    Rails.application.configure do


这没有解决任何问题。哦,如果有帮助的话,我正在使用Windows。

当您运行
rails new
命令时,它应该正确设置您的应用程序名称。我认为发生的事情可能是你运行了
railsnewfirstapp
,而不是
railsnewfirstapp
。将
First\u app::Application.configure do
更改为
FirstApp::Application.configure do
。你可能还应该在你的项目中搜索Firstapp或First_App,并对其进行更改

当您运行
railsnew
命令时,它应该已经正确设置了应用程序的名称。我认为发生的事情可能是你运行了
railsnewfirstapp
,而不是
railsnewfirstapp
。将
First\u app::Application.configure do
更改为
FirstApp::Application.configure do
。你可能还应该在你的项目中搜索Firstapp或First_App,并对其进行更改

当您运行
railsnew
命令时,它应该已经正确设置了应用程序的名称。我认为发生的事情可能是你运行了
railsnewfirstapp
,而不是
railsnewfirstapp
。将
First\u app::Application.configure do
更改为
FirstApp::Application.configure do
。你可能还应该在你的项目中搜索Firstapp或First_App,并对其进行更改

当您运行
railsnew
命令时,它应该已经正确设置了应用程序的名称。我认为发生的事情可能是你运行了
railsnewfirstapp
,而不是
railsnewfirstapp
。将
First\u app::Application.configure do
更改为
FirstApp::Application.configure do
。你可能还应该在你的项目中搜索Firstapp或First_App,并对其进行更改

这显然与我的Gem文件有关。我没有对它进行编辑,而是让它单独运行,应用程序最终编译时没有出现任何错误。我认为这与SQLite3 gem有关,因为我在版本方面做得不好。

这显然与我的gem文件有关。我没有对它进行编辑,而是让它单独运行,应用程序最终编译时没有出现任何错误。我认为这与SQLite3 gem有关,因为我在版本方面做得不好。

这显然与我的gem文件有关。我没有对它进行编辑,而是让它单独运行,应用程序最终编译时没有出现任何错误。我认为这与SQLite3 gem有关,因为我在版本方面做得不好。

这显然与我的gem文件有关。我没有对它进行编辑,而是让它单独运行,应用程序最终编译时没有出现任何错误。我认为这与SQLite3 gem有关,因为我在版本方面做得不好

    First_app::Application.configure do