我在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进行应用程序。任何人都可以帮助我,我将不胜感激!
答案 0 :(得分:0)
我只是看到rails 5.1的版本实际上与这个gem不兼容! 如果有人想在这里看到:https://github.com/plataformatec/simple_form/commit/8d15b7ebc8096348b611e9f2905a2576a5bce508