我正在尝试在我的rails应用程序中使用jquery-smooth-scroll-rails gem(https://rubygems.org/gems/jquery-smooth-scroll-rails/versions/0.0.5),但当我将其添加到我的gem文件并使用rails运行服务器时,我得到以下内容我的终端错误:
[Authorize]
[Route("api/User/Files")]
public async Task<IHttpActionResult> GetPolicies()
{
string email = HttpContext.Current.User.Identity.GetUserId();
AgentDAL agntDAL = new AgentDAL();
var agnt = agntDAL.Get_agent_info(email);
Agent agent = agnt[0];
var policyList = agntDAL.Get_policy_info(agent.AGENCY);
return Ok(policyList);
}
rails的版本是:
Traceback (most recent call last):
23: from ./bin/rails:3:in `<main>'
22: from ./bin/rails:3:in `load'
21: from /Users/owenmoss/code/OKMantis/ceremonibiza/bin/spring:15:in `<top (required)>'
20: from /Users/owenmoss/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
19: from /Users/owenmoss/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
18: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
17: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
16: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
15: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
14: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
13: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
12: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
11: from /Users/owenmoss/code/OKMantis/ceremonibiza/bin/rails:9:in `<top (required)>'
10: from /Users/owenmoss/code/OKMantis/ceremonibiza/bin/rails:9:in `require'
9: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
8: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
7: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in `server'
6: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in `tap'
5: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:78:in `block in server'
4: from /Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:78:in `require'
3: from /Users/owenmoss/code/OKMantis/ceremonibiza/config/application.rb:9:in `<top (required)>'
2: from /Users/owenmoss/code/OKMantis/ceremonibiza/config/application.rb:10:in `<module:Ceremonibiza>'
1: from /Users/owenmoss/code/OKMantis/ceremonibiza/config/application.rb:18:in `<class:Application>'
/Users/owenmoss/code/OKMantis/ceremonibiza/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `load_defaults' for #<Rails::Application::Configuration:0x00007f9c0b226d80> (NoMethodError)
它与railtie gem有关,它是jquery-smooth-scroll-rails gem的依赖。我尝试过不同的东西,但似乎没什么用。我想用宝石。有什么建议吗?