I installed integrity app these days. and found some issues.
I follow this.
$ gem install bundler
$ git clone git://github.com/integrity/integrity
$ cd integrity
$ git checkout -b deploy v22
$ bundle install
$ bundle lock
$ rake db
at the end steps, I can't find and folders named ".bundle" in the integrity folder.
and the .bundle/environment.rb too.
so I was blocked there.
and btw, anybody can sent me a better way to install and config integrity app?
thank you very much
This is probably because you have a too recent version of bundler installed. Integrity v22 is not compatible with bundler > 0.9, but relies on functionality that was in removed in the subsequent version. In my case I installed bundler 0.9 before I ran bundle install:
gem install bundler --version=0.9
You might have to uninstall the newer bundler version, too.
Related
I am working in aws c9 and I am trying to send my app to heroku but it keeps telling me I am running the wrong version of bundler, so I run gem install bundler locally and I get 2.0.1, but on Heroku it keeps running 1.17.1 and I can't change this version.
Heroku pin the bundler version for reasons of their own:
The Bundler version on Heroku is carefully curated. A balance needs to be struck between supporting new Bundler features and stability. The work we put into curating the Bundler version ensures maximum stability, and avoids deprecation and notification cycles on Bundler as it changes, or as bugs are fixed or security issues are patched by Heroku.
https://devcenter.heroku.com/articles/bundler-version
They're still on 1.17.1 at time of writing, but that shouldn't generally be a problem.
EDIT
This might be a problem because your local version of bundler is later than that. This is especially the case if you're running bundler 2+ locally, because that creates a Gemfile.lock which won't allow older versions to install from it.
If that's the case then you need to downgrade your local version and rebundle:
local> gem uninstall bundler
local> gem install bundler -v 1.17.1 (or whatever version)
local> rm Gemfile.lock
local> bundle install
I'm learning Rails with tutorials from Ruby on Rails by Michael Hartl: https://www.railstutorial.org/book
I used the following command to generate a controller:
rails generate controller StaticPages home help
Which generates the following error regarding version conflicts:
check_version_conflict': can't activate bundler-1.12.4, already
activated bundler-1.13.0.pre.1 (Gem::LoadError)
I don't know which bundler version to use. The current version of bundler is: 1.13.pre.1
The following command continued failing due to about five gem dependencies that failed to install automatically, which included listen and nokigiri.
bundle install --without production
I tried installing the dependent gems manually, but I'm still having issues.
How do I resolve the check_version_conflict issue with Bundler when generating Rails controllers?
I'll accept an answer that instructs removing current Ruby libs and installing a new development environment from scratch.
Bundler will install project-specific versions of your gems so that you don't have to manage global dependencies.
In effect, if you install Rails with bundler and you also install it with sudo gem install rails or something like that, you'll have two versions on your computer. By default, calling rails will refer to the global version.
If you call bundle exec rails (or bundle exec <gem_name>), it will call the bundler-specific version.
Ten steps to resolve your issues with Bundler
(optional) Uninstall Ruby. There are many ways to do so, here's one: https://superuser.com/questions/194051/how-to-completely-remove-ruby-ruby-gems-on-mac-os-x-10-6-4
(optional) Use rbenv to install Ruby. Follow instructions here: https://github.com/rbenv/rbenv
Make a repo directory that will house your future Rails app
From the command line:
mkdir repo
cd repo
Install Bundler and create a Gemfile for the directory
From the command line:
gem install bundler
bundle init
Open the repo/Gemfile with your editor, and configure it to instruct Bundler which version of Rails to install
In repo/Gemfile:
source "https://rubygems.org"
gem "rails", "4.2.6"
Install Rails via Bundler
From the command line:
bundle install
Create a new Rails app using Bundler, and cd into it
From the command line:
bundle exec rails new whatevs
cd whatevs
Your Rails app will have a Gemfile by default. Open it and add the gems you wish to use in your app.
In repo/whatevs/Gemfile:
gem 'nokogiri', '1.6.8'
From repo/whatevs/ directory, install your app's Gems via Bundler
From the command line:
bundle install
From repo/whatevs/ directory, generate a controller
From the command line:
bundle exec rails generate controller static_pages home help
While running the bundle install, it stops installing when it reaches the installation of the byebug gem. Saying, the gem maybe corrupt. I have tried uninstalling the ruby application and also tried updating my ruby and also my rails version
If you are using Bundler 1.1 or later you can use bundle clean, or bundle clean --force just as you imagined you could. This is redundant if you're using bundle install --path (Bundler manages the location you specified with --path, so takes responsibility for removing outdated gems), but if you've used Bundler to install the gems as system gems then bundle clean --force will delete any system gems not required by your Gemfile. Blindingly obvious caveat: don't do this if you have other apps that rely on system gems that aren't in your Gemfile!
Source -Bundle Clean
When I run "rake assets:clean" I get the error:
ExecJS::RuntimeUnavailable: Node.js (V8) runtime is not available on this system
There are several posts about this, but they all say "install nodejs"
I have installed nodejs though.
$ which nodejs
/usr/bin/nodejs
$ nodejs -v
v0.10.25
And also nodejs legacy
$ which node
/usr/bin/node
$ node -v
v0.10.25
I'm on Ubuntu 14.
$ rake about
...
Ruby version 1.9.3 (x86_64-linux)
RubyGems version 2.4.3
Rack version 1.4
Rails version 3.2.13
JavaScript Runtime Node.js (V8)
Active Record version 3.2.13
....
What is really killing me is that this was working fine until I tried to remove a binstubs warning by cleaning the bin directory.
I've tried to undo everything I did to fix the binstubs issue - going back to a clean version in git, reinstalling rvm, reinstalling ruby, reinstalling my gems. I'm out of ideas on how to fix this.
I wonder if it's something stupid like an issue with my PATH:
$ echo $PATH
/home/andy/.rvm/gems/ruby-1.9.3-p551/bin:/home/andy/.rvm/gems/ruby-1.9.3-p551#global/bin:/home/andy/.rvm/rubies/ruby-1.9.3-p551/bin:/home/andy/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/heroku/bin
I had added "PATH: './bin:$PATH'" to my local_env.yml file. See comment above. Doh!
I'm currently working on a project which was changed from ruby version 2.0.0 to ruby verion 2.1.1,
i'm using rvm for maintaining my ruby versions. After installing ruby 2.1.1, I ran gem install bundler which installed version 1.6.2, doing so I had copied a specific gemset version to a newly created one for version 2.1.1 after which when running gem list on, it displayed all the gems, and when I tried to run the app it started throwing errors.
So when I ran bundle install again it created a separate folder parallel and installed the gems there. My question is why does this happen, is it a new feature of bundler 1.6.2'?
Initially I had my bundler version to 1.5.2.
Any input on this will be really helpful.
Thanks.
Found this post which explains clearly, the reason was my config file was corrupted.
we have to remove .bundle/config file and bundle install again.
rm -r .bundle/config
bundle install
click here for more information.
Thanks.
My guess is you have two different bundlers tied to a different RVM gemset, even if you tried to install the newest globally.
In the future you may consider using :
bundle install --path .bundle
to install your gems in a consistent manner, always in the same .bundle folder, no matter what RVM gemset you're using.