我是新手在Ruby和ROR框架中。我尝试使用JQuery创建Web应用程序。我的步骤如下:
- 添加了gem 'jquery-rails'并从命令行执行了bundle install命令
- 将
//= require jquery2
字符串添加到application.js文件中 - 现在我试图将文件包含到页面中。我在application.html.erb文件中的
中添加了字符串 <%= javascript_include_tag "application" %>
当我尝试在浏览器中查看页面时,我看到错误消息:
Sprockets::Rails::Helper::AssetNotFound in LandingPage#index
The asset "application.js" is not present in the asset pipeline.
<%= javascript_include_tag "application" %>
我做错了什么?我在谷歌上搜索这个错误,但没有找到任何合适的解释。