generates simple_form with Bootstrap4 don't work's - hadoop-yarn

I'm generating simple_form with bootstrap4 on Rails 5.1, so I search in the web and try these ways:
rails generate simple_form:install --bootstrap
rails generate simple_form:install --bootstrap4
rails generate simple_form:install --bootstrap4 --force
And no one of that generates the file configured like: config/initializers/simple_form_bootstrap.rb
I watch with version is installed and is the version of simple_form 1.4.1. I try to put the new version 3.2.1 but I have errors when run the bundle update command.
And I have these errors:
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)
I'm trying to do an application with the new version rails 5.1. Anyone could help me I will appreciate!

I just see the version of rails 5.1 isn't compatible with this gem actually!
If someone want to see here: https://github.com/plataformatec/simple_form/commit/8d15b7ebc8096348b611e9f2905a2576a5bce508

Related

Bundle exec doesn't work

I am trying to use rails-erd. The last time I used it was in February and worked fine
I tried using erd and bundle exec erd
I am getting this error.. I have rails 4 in another project, but in this project I use rails 3.2.15 in the gem file
Loading application in 'my_app'...
WARN: Unresolved specs during Gem::Specification.reset:
activerecord (>= 3.0)
i18n (>= 0.6.4, ~> 0.6)
multi_json (~> 1.3)
tzinfo (~> 0.3.37)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Failed: Gem::LoadError: You have already activated activesupport 4.0.0, but your Gemfile requires activesupport 3.2.15. Using bundle exec may solve this.
What does this mean and how do I solve this?
The error shows that you have already activated activesupport 4.0.0 but in your gemfile.lock file the version of the activesupport is 3.2.15.
So simply delete the gemfile.lock file and again bundle install
It will take the latest version of activesupportor, or either you can change the version manually.
In the Gemfile of the app specify the version of Rails if you haven't done so:
gem 'rails', '3.2.15'
Run bundle install then try running the script again using bundle exec.
If it still doesn't work try uninstalling rails 4 and then running it.
gem uninstall rails
Ideally if you're executing your script with bundle exec it always execute the script in the context of the current bundle using the Gemfile.

rails gem incompatibility clearance & railties, what should I do?

I have rails 3.017, and clearance 1.0.0.rc2 and trying to install gem 'jquery-rails', '~> 2.1'
Do I need an older version of jquery-rails? If so, how can I figure this out?
thanks
Joel
Bundler could not find compatible versions for gem "railties":
In Gemfile:
jquery-rails (~> 2.1) ruby depends on
railties (< 5.0, >= 3.1.0) ruby
clearance (= 1.0.0.rc2) ruby depends on
railties (3.0.17)
Yes, you need an older version of this gem. If you don't specify a certain version of jquery-rails in your Gemfile, Bundler will find the matching version for you, if you run bundle install.
You can find out the dependencies of a gem with the gem manager:
$ gem dependency jquery-rails -v 2.1.3

Rake gems:install yields error when following declarative authorization Railscast

I'm following Railstcast #188 to get declarative authorization running on my Rails 3 app (using Ruby 1.9.2) and am running into an issue getting the gem to install.
Ryan suggests adding it in config/environment.rb with the following:
config.gem "declarative_authorization", :source => "http://gemcutter.org"
Then install it with sudo rake gems:install.
However when I try that I get an error:
/Users/Travis/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:314:in `bin_path': can't find gem rake ([">= 0"]) with executable rake (Gem::GemNotFoundException)
I tried rake gems:install, but got this error:
Don't know how to build task 'gems:install'
The instructions to install declarative_authorization at GitHub recommend a different process, which I also followed but still couldn't get past rake:gems install.
Does anyone know what may be happening so I can get around this?
UPDATE: Here's what my config/environment.rb looks like:
RVM -v: rvm 1.10.0-pre
Gem list:
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.9, 3.0.5)
actionpack (3.0.9, 3.0.5)
activemodel (3.0.9, 3.0.5)
activerecord (3.0.9, 3.0.5)
activeresource (3.0.9, 3.0.5)
activesupport (3.0.9, 3.0.5)
addressable (2.2.6)
arel (2.0.10)
aws-s3 (0.6.2)
aws-sdk (1.3.2)
builder (2.1.2)
bundler (1.0.21 ruby)
cocaine (0.2.1, 0.2.0)
erubis (2.6.6)
faraday (0.7.6, 0.7.5)
fastercsv (1.5.4)
gemcutter (0.7.1)
heroku (2.14.0)
httparty (0.8.1)
i18n (0.6.0, 0.5.0)
jquery-rails (1.0.19, 1.0.16)
json (1.6.5)
launchy (2.0.5)
mail (2.2.19)
metaclass (0.0.1)
mime-types (1.17.2)
mocha (0.10.3, 0.10.2, 0.10.0)
multi_json (1.0.4)
multi_xml (0.4.1)
multipart-post (1.1.4)
nifty-generators (0.4.6)
nokogiri (1.5.0)
paperclip (2.5.2, 2.5.0, 2.4.5)
pg (0.12.2, 0.12.0, 0.11.0)
polyamorous (0.5.0)
polyglot (0.3.3)
rack (1.2.5, 1.2.4)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.9, 3.0.5)
railties (3.0.9, 3.0.5)
rake (0.9.2.2, 0.9.2, 0.8.7)
rake-compiler (0.7.9)
ransack (0.6.0, 0.5.8)
rdoc (3.8)
rest-client (1.6.7)
rubyzip (0.9.5)
simple_oauth (0.1.5)
sqlite3 (1.3.5, 1.3.4)
sqlite3-ruby (1.3.3)
term-ansicolor (1.0.7)
thor (0.14.6)
treetop (1.4.10)
twitter (2.1.0, 2.0.2)
tzinfo (0.3.31, 0.3.30)
uuidtools (2.1.2)
xml-simple (1.1.1)
Not sure how your environment is set up, but simply installing rake should do it. If you provide more detail (rvm, bundler, etc.) it may be of help.
gem install rake
Upon further inspection of your path, I see you're using RVM. If your paths are installed properly, you can either use the RVM Global gemset, execute the line above.
Another suggestion I have is checking out the CanCan railscast as that is the bigger norm for authorization these days, more supporters as well.
http://railscasts.com/episodes/192-authorization-with-cancan
"A few episodes ago we covered Declarative Authorization. While it is an excellent authorization plugin for Rails it can be a little heavy for simpler sites. After writing the Railscast on Declarative Authorization Ryan Bates looked for an alternative solution and, failing to find one that suited his needs, decided to write his own, CanCan." - RBates
After seeing your environment, let's try to separate the environments a little. Do this.
rvm gemset create some_other_name
rvm gemset use some_other_name
bundle install
See if this isolates your environment enough.
EDIT: I don't use rake gems:install anymore. You have bundler installed, and I'm assuming you want to use it. I do use rails g gemname:install when the documentation for such exists, I'm going to look at the railscasts again and see what rbates is telling you.
On the CANCAN github page, it says: In Rails 3, add this to your Gemfile and run the bundle command.
gem "cancan".

Trouble installing Mongoid with Rails 3 on Windows

In my Gemfile:
gem "mongoid", "~> 2.3"
gem "bson_ext", "~> 1.4"
When I run bundle install I get the error below:
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
mongoid (~> 2.3) x86-mingw32 depends on
activemodel (~> 3.1) x86-mingw32
rails (= 3.0.6) x86-mingw32 depends on
activemodel (3.0.6)
I've tried pointing to github for the version, as is suggested in some other posts, but when I do this and run bundle install, I get another error:
Fetching http://github.com/mongoid/mongoid.git
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/source.rb:579:in
``': No such file or directory - git clone "http://github.com/mongoid/mongoid.gi
t" "C:/Ruby192/lib/ruby/gems/1.9.1/cache/bundler/git/mongoid-96bbbaf83f2d1e3487e
c2c95b9e5148015a7a346" --bare --no-hardlinks (Errno::ENOENT)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/sour
ce.rb:579:in `git'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/sour
ce.rb:653:in `cache'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/sour
ce.rb:551:in `specs'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/defi
nition.rb:356:in `block in converge_locked_specs'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/defi
nition.rb:345:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/defi
nition.rb:345:in `converge_locked_specs'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/defi
nition.rb:143:in `resolve'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/defi
nition.rb:90:in `specs'
Any tips are appreciated. Thanks!
If I recall correctly, bson_ext needs to be built natively. This means that somehow you must build it on Windows. The errors are pointing to x86-mingw32, which can be downloaded from here
The reason you would need that is because there are a couple of libraries that are platform dependent. Hope this sets you in the right direction.

Rails 3.1: Devise_invitable requires Rails 3.0.0?

When adding devise_invitable to my Gemfile, I get this error when doing bundle install.
$ bundle install
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "rails":
In Gemfile:
devise_invitable (~> 0.4.0) depends on
rails (~> 3.0.0)
rails (3.1.0)
In your Gemfile, update devise_invitable to use a newer version (current is 0.5.4) instead of 0.4.0; 0.5.4 supports Rails 3.1.