我在 Rails 5.1 上使用 bootstrap4 生成simple_form,所以我在网上搜索并尝试以下方法:
rails generate simple_form:install --bootstrap
rails generate simple_form:install --bootstrap4
rails generate simple_form:install --bootstrap4 --force
并且没有人生成配置如下的文件:config/initializers/simple_form_bootstrap.rb
我看版本已安装,是simple_form 1.4.1
的版本。我尝试放置新版本 3.2.1,但在运行 bundle update
命令时出现错误。我有这些错误:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (~> 5.1.0) was resolved to 5.1.0, which depends on
actionpack (= 5.1.0)
rails (~> 5.1.0) was resolved to 5.1.0, which depends on
actionpack (= 5.1.0)
rails (~> 5.1.0) was resolved to 5.1.0, which depends on
actionpack (= 5.1.0)
rspec-rails (~> 3.5) was resolved to 3.6.0, which depends on
actionpack (>= 3.0)
simple_form (~> 3.2.1) was resolved to 3.2.1, which depends on
actionpack (< 5.1, > 4)
我正在尝试使用新版本的rails 5.1做一个应用程序。任何人都可以帮助我,我将不胜感激!
我只是看到 rails 5.1 的版本实际上与此宝石不兼容!如果有人想在这里看到:https://github.com/plataformatec/simple_form/commit/8d15b7ebc8096348b611e9f2905a2576a5bce508