Redmine installation error - bundler

I installed Redmine on my server.
When I run:
bundle install --without development test
I see an error, because I don't have PostgreSQL (and I don't use it). I want to run the bundler with parameter --without-pg, but I see this error:
root#localhost:/home/work/dev.redmine# bundle install --without-pg development test
Unknown switches '--without-pg'
Bundler version is
Bundler version 1.1.5
How can I fix this problem?

I think that your command was wrong. You just need to remove the char - between without and pg
bundle install --without pg development test
Regards
Paul

Related

An error occurred while installing pg (1.0.0), and Bundler cannot continue

I'm trying to deploy Zipsell with heroku. However when I run through the heroku and ruby setup and try to deploy via:
git clone https://github.com/yongfook/zipsell
cd zipsell
./bin/setup
I get the error message:
An error occurred while installing pg (1.0.0), and Bundler cannot continue.
Make sure that gem install pg -v '1.0.0' --source 'https://rubygems.org/' succeeds before bundling.
In Gemfile:
pg
I have run through the setup process now multiple times and reinstalled all but still am not able to deploy. Any idea what is going wrong?
From the repo you posted it seems the error message is very clear. From the Gemfile of the repo you shared it seems you haven't install pg which is the postgresql (You will need to remove sqlite.
The problem is that there are some missing dependencies that you don't have installed and that why the error is thrown. There is the concepts of gems which is packaged code. https://rubygems.org/ via the following website you can find some of the gems you'r missing. There is also the versions which have to be compatible.
What you'll do is search for the missing gems shown in the error message. Check for the correct version if you the gem in your Gemfile but the version is conflicting.
https://github.com/yongfook/zipsell/blob/master/Gemfile
bundle update
install the missing gems
gem install pg
and so on. Or do it straight in the Gemfile.

Gitlab installation - Ruby rail error

I'm using Ubuntu 16.10 and was updating my Gitlab from 6.8 to 7 and everything went wrong. Now I have removed it and is trying to install a new version but ran into a problem with Ruby.
When I try install it
$ sudo apt install gitlab
I get an error after some time:
Could not find gem 'rails (>= 4.2.7.1, ~> 4.2.7)' in any of the gem sources
listed in your Gemfile.
I have tried to run
$ sudo gem install rails
but this gives me another error:
ERROR: Error installing rails:
activesupport requires Ruby version >= 2.2.2.
I don't know what to do now...
I have started all over... Removed gitlab* and postgresql. Rebooted and installed gitlab again. Now I got another error:
Could not find gem 'pg (~> 0.18.2)' in any of the gem sources listed in your Gemfile.
Tried to install pg manually:
$ sudo gem install pg
Successfully installed pg-0.20.0
But still sudo apt upgrade gives the same error: "Could not find gem 'pg'
You may be missing a hidden dependency. Try the following:
sudo apt-get install libpq-dev
I gave up! I reinstalled the Linux server with the Linux LTS version and used the Omnibus package installation..
Problem solved!

Travis reports odd message of corrupted Gemfile.lock

Im using bundler to install stuff and since I have added Gemfile.lock, travis started to complain with:
Your Gemfile.lock is corrupt. The following gem is missing from the DEPENDENCIES
section: 'echoe'
Of course, everything works locally. It also works using DeployBot. I even installed docker ubuntu and tried, still ok. My Gemfile.lock is not corrupt. Same versions of ruby and bundler is used.
What is going on?
Update
This is something related to bundler version. Im using 1.11.0, but got reports that it worked with eg. 1.8.3. ??
We've seen a very similar issue today on Buildkite due to the recent release of a new bundler version
https://rubygems.org/gems/bundler/versions/1.11.0
We got the build working by stipulating the version of bundler to install.
gem install -v 1.10.6 bundler --no-rdoc --no-ri
and forcing the use of that
bundle _1.10.6_ install
Firstly, remove the gem lock file:
rm -f Gemfile.lock
Then install the dependencies:
bundle install
You can update the dependencies to ensure that you won't get an error:
bundle update

bson_ext 1.7.0 fails to build on Linux when using bundle:install Capistrano task

Here is the error message:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
Gem files will remain installed in /var/www/app_dir/shared/bundle/ruby/1.8/gems/bson_ext-1.7.0 for inspection.
Results logged to /var/www/app_dir/shared/bundle/ruby/1.8/gems/bson_ext-1.7.0/ext/cbson/gem_make.out
An error occured while installing bson_ext (1.7.0), and Bundler cannot continue.
Make sure that `gem install bson_ext -v '1.7.0'` succeeds before bundling.
I tried running gem install bson_ext -v '1.7.0' and this succeeded with no errors. I've tried installing ruby-dev and ruby1.8-dev apt packages and this did not help.
bundle install is able to successfully build bson_ext on my Mac OS X development system but is failing in the Linux production environment even when I run it directly outside of the context of the capistrano bundle:install task.
I have also tried running gem update --system and gem update bundler and this didn't help.
I suspect the issue lies in how bundle install is called on the target system. Still, I tried updating Capistrano to version 2.13.5 and this did not help.
So, it appears that bundler 1.2.1 is is unable to build the following gems on my system:
bson_ext 1.7.0
curb 0.8.3
nokogiri 1.5.5
json 1.7.5
therubyracer 0.8.2.
I was able to build these using gem install <GEMNAME> -v '<VERSION>' --install-dir /var/www/<APP_DIR>/shared/bundle/ruby/1.8/. After this, running bundle exec capistrano deploy succeeded.
bundle does not appear to be able to build gems with native extensions on my system. Not sure why, but maybe this procedure will help those with a similar issue.

rubymine - Could not find gem "jquery-rails"

I have installed rubymine and Ruby193 (with rubyinstaller).
I now create a rails aplication with "preconfigured for selected database" - "mySqL " checkbox selected
When I click the execute it prints the following error :
D:/Programs/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'jquery-rails (>= 0) x86-mingw32' in the gems available on this machine. (Bundler::GemNotFound)
ideas?
Install this gem separately:
gem install jquery-rails
or via Bundler
bundle install (in the project directory where your Gemfile is located)
Here is the latest version of jquery-rail to install in ubuntu via terminal:
gem install jquery-rails -v 4.0.4
On Windows (at least from what I was just doing) rubymine fails to install gems with bundle install that are very easily installed from the command prompt using the gem install command as shown above.
This will install the gem which will allow you to rerun the rubymine bundler to create your bundle.
*I wanted to put this on the answer above me as a comment but I can't add it for some reason.
There must be some option to let the bundle command in rubymine to download new gems. Is it --system?
I've had this problem recently and found a simple way to bypass it.
CD into the project folder and check the gemfile to make sure the gems are present.
Run bundle install in the project folder. This should install the missing gems into the project folder. Everything worked fine for me after that.

Resources