GitlabHQ installating on Ubuntu 12.04 - ruby

I am facing some problem in installing Gitlabhq on Ubuntu 12.04
I am getting this error
$ sudo -u git -H bundle install --deployment --without development test postgres
/usr/local/bin/bundle:9:in `require': no such file to load -- rubygems (LoadError)
from /usr/local/bin/bundle:9
Here are the different packages i have installed on my computer.
$ ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [i686-linux]
$ gem -v
2.0.3
$ gem list
* LOCAL GEMS *
bigdecimal (1.1.0)
charlock_holmes (0.6.9.4)
io-console (0.3)
json (1.5.5)
minitest (2.5.1)
rake (0.9.2.2)
rdoc (3.9.5)
rubygems-update (2.0.3)

That kind of error is generally the result of using the wrong ruby version as in issue 3706.
Using a 1.9.x ruby, as in issue 3349, should solve the problem.

Related

installing passenger rack error

When I am installing the passenger rack I am getting the following error
I have upgraded to the version 1.9.3 as shown below
any suggestion
[centos#ip-10-1-213-37 puppet]$ sudo gem install passenger
ERROR: Error installing passenger:
rake requires Ruby version >= 1.9.3.
[centos#ip-10-1-213-37 puppet]$ ruby -v
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
You call ruby -v as regular user, and sudo gem install passenger as root. I suggest you to upgrade your ruby version; you could use rvm for this purpose.

How to launch calabash-android on OS X? (Ruby gems dependency error)

I've successfully generated file tree via calabash-android gen
After that I've tried to run tests:
calabash-android run ../app/build/outputs/apk/app-debug.apk
But got error:
Unable to activate calabash-android-0.9.0, because json-2.0.2 conflicts with json (~> 1.8) (Gem::ConflictError)
I've installed json 1.8.6 via gem install 'json' -v 1.8.6
and now gem list json outputs me
*** LOCAL GEMS ***
json (default: 2.0.2, 1.8.6)
multi_json (1.12.1)
But error Unable to activate calabash-android-0.9.0, because json-2.0.2 conflicts with json (~> 1.8) (Gem::ConflictError) throwed again. Where I am wrong?
UPD
I've tried to solve problem as described here github.com/calabash/calabash-ios/issues/1260 but osx says that I cant remove 2.0.2 version because it's default
MacBook-Pro-MacBook:calabash zub3r$ gem uninstall -Vax --force --no-abort-on-dependent json
ERROR: While executing gem ... (Gem::InstallError)
json is not installed in GEM_HOME, try:
gem uninstall -i /Users/zub3r/.rvm/gems/ruby-2.4.0#global json
MacBook-Pro-MacBook:calabash zub3r$ gem uninstall -i /Users/zub3r/.rvm/gems/ruby-2.4.0#global json
You have requested to uninstall the gem:
json-1.8.6
calabash-android-0.9.0 depends on json (~> 1.8)
cucumber-1.3.20 depends on json (~> 1.7, development)
luffa-2.0.0 depends on json (~> 1.8)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN] ^CERROR: Interrupted
MacBook-Pro-MacBook:calabash zub3r$ gem uninstall -i /Users/zub3r/.rvm/gems/ruby-2.4.0#global json --version 2.0.2
ERROR: While executing gem ... (Gem::InstallError)
gem "json" cannot be uninstalled because it is a default gem
Problem solved by using bundler
bundle init
Gemfile content replaced with
# frozen_string_literal: true
source "https://rubygems.org"
gem 'calabash-android'
then
bundle install
I was facing same issue,I had downgraded my ruby version and it got solved.
Please find the solution below
$ gem -v
2.0.3
$ gem list rubygems-update
$ gem uninstall -v 2.0.3 rubygems-update
$ gem install -v 1.8.24 rubygems-update
$ update_rubygems
$ gem -v
1.8.24

Can't install bundle - endless error message

This is what I'm using: Windows 8. Cygwin32. Rvm version 1.25.27. Ruby version 2.1.2p95. Gem version 2.3.0. Drush version 5.9.
I'm totally new to all this so it's very possible that the explanation is something really simple.
I tried to use "drush omega-guard" from my drupal theme folder but got an error saying I had to install Bundler version 1.2 or newer. This is all fine since I hadn't installed bundle. But when I try to use the command "bundle install" I get this:
$ bundle install
-bash: bundle: kommandot finns inte
(Kommandot finns inte = Command not found.)
When I try using "gem bundler install" I get this:
$ gem bundler install
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command bundler
I also tried "gem bundle install":
$ gem bundle install
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command bundle
So I used "which bundle" and then used cd to get to that folder.
$ which bundle
/home/I/.rvm/gems/ruby-2.1.2/bin/bundle
I tried the same commands again, but from the other folder, and ended up with this:
I#I ~/.rvm/gems/ruby-2.1.2/bin
$ gem install bundler
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
I#I ~/.rvm/gems/ruby-2.1.2/bin
$ gem install bundle
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
I#I ~/.rvm/gems/ruby-2.1.2/bin
$ bundle install
/home/I/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler' (>= 0) among 13 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/home/I/.rvm/gems/ruby-2.1.2:/home/I/.rvm/gems/ruby-2.1.2#global', execute `gem env` for more information
from /home/I/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:322:in `to_spec'
from /home/I/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'
from /home/I/.rvm/gems/ruby-2.1.2/bin/bundle:22:in `<main>'
When I use command "gem list" bundle isn't listed:
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.5, 1.2.4)
io-console (0.4.2)
json (1.8.1)
minitest (5.3.5, 4.7.5)
psych (2.0.5)
rake (10.3.2, 10.1.0)
rdoc (4.1.1, 4.1.0)
test-unit (2.5.5, 2.1.2.0)
What am I missing or doing wrong? I have been following this tutorial and everything has worked fine up until this point: https://www.youtube.com/watch?v=XF_LaSfua8Y&index=10&list=PLLnpHn493BHH5nnK2dKE_42l1oXA6Tq6H
EDIT: Since I asked this question I tried reinstalling ruby 2.1.2. The installation stuck on "#importing gemset" and after about 36 hours my computer was turned of due to a blackout. I therefore don't know if the reinstallation was completed or not. After that I also changed my gem version to 2.1.2 to match the ruby version. Theese things seemed to help and afterwards I could run both "gem install bundler" and "bundle install". My gemlist now looks like this:
$ gem list
*** LOCAL GEMS ***
addressable (2.3.6)
bigdecimal (1.2.5, 1.2.4)
breakpoint (2.0.7)
bundle (0.0.1)
bundler (1.6.3)
celluloid (0.15.2)
chunky_png (1.3.1)
coderay (1.1.0)
color-schemer (0.2.8)
compass (0.12.6)
compass-blend-modes (0.0.2)
compass-normalize (1.5)
compass-rgbapng (0.2.1)
compass-validator (3.0.1)
css_parser (1.3.5)
dash (0.4.0)
fssm (0.2.10)
io-console (0.4.2)
json (1.8.1)
minitest (5.3.5, 4.7.5)
psych (2.0.5)
rake (10.3.2, 10.1.0)
rdoc (4.1.1, 4.1.0)
sass (3.2.19)
test-unit (2.5.5, 2.1.2.0)
timers (1.1.0)
But a new problem occur when I try running "drush omega-guard":
$ drush omega-guard
Which theme do you want to run Guard for?
[0] : Cancel
[1] : Ohm (Subtheme of Omega) - Omega based demonstration theme. Serves as a
best-practice reference for the Omega documentation. Ohm will be
constantly updated as best practice evolves so shouldn't be used in
production.
[2] : Omega - A powerful HTML5 base theme framework utilizing tools like
Sass, Compass, Grunt, Bower, Ruby Version Manager, Bundler and more.
[3] : Design (Subtheme of Omega) - Please provide a description for
your theme.
3
There was a problem with your setup: [error]
Resolving dependencies...
Bundler can't satisfy your Gemfile's dependencies.
Install missing gems with `bundle install`.
So I try using the command "bundle install" again but end up with an endless error message:
$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using addressable 2.3.6
Using chunky_png 1.3.1
Using fssm 0.2.10
Using sass 3.2.19
Using compass 0.12.6
Using breakpoint 2.0.7
Using timers 1.1.0
Using celluloid 0.15.2
Using coderay 1.1.0
Using compass-blend-modes 0.0.2
Using color-schemer 0.2.8
Using compass-normalize 1.5
Using compass-rgbapng 0.2.1
Using compass-validator 3.0.1
Using css_parser 1.3.5
0 [main] ruby 15100 child_info_fork::abort: address space needed by 'fcntl.so' (0x620000) is already occupied
0 [main] ruby 11364 child_info_fork::abort: address space needed by 'fcntl.so' (0x620000) is already occupied
1 [main] ruby 14584 child_info_fork::abort: address space needed by 'fcntl.so' (0x620000) is already occupied
The last three lines keep on repeating forever but with different numbers. So what is the problem this time?
Drush is a PHP app, not an Ruby one.
You need a PHP work environment (at first an PHP cli) to work with drush.

Cannot run Jekyll new command

I tried to use Jekyll new command, but it didn't work and came out following errors.
$ jekyll new myblog
/Library/Ruby/Gems/1.8/gems/commander-4.1.6/lib/commander/runner.rb:385:in `require_program': program version required (Commander::Runner::CommandError)
from /Library/Ruby/Gems/1.8/gems/commander-4.1.6/lib/commander/runner.rb:384:in `each'
from /Library/Ruby/Gems/1.8/gems/commander-4.1.6/lib/commander/runner.rb:384:in `require_program'
from /Library/Ruby/Gems/1.8/gems/commander-4.1.6/lib/commander/runner.rb:52:in `run!'
from /Library/Ruby/Gems/1.8/gems/commander-4.1.6/lib/commander/delegates.rb:8:in `run!'
from /Library/Ruby/Gems/1.8/gems/commander-4.1.6/lib/commander/import.rb:10
from /usr/bin/jekyll:23
/Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require': no such file to load -- json (LoadError)
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/jekyll-1.4.3/bin/../lib/jekyll/filters.rb:2
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/jekyll-1.4.3/bin/../lib/jekyll.rb:44
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/jekyll-1.4.3/bin/jekyll:7
from /usr/bin/jekyll:23:in `load'
from /usr/bin/jekyll:23
I'm using Mac OS X 10.8.5 Mountain Lion.
I checked stackoverflow and found a post which has a similar problem.
Error when running jekyll new command
Then I tried the below command.
$ sudo gem install json
but It didn't work for my situation. I uninstalled and reinstalled json but nothing happened.
Please let me know if you know any other solutions. I've been stuck on this problem since the beginning of the week...
my gem list & gem environment are as follows.
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.4)
blankslate (2.1.2.4)
classifier (1.3.4)
colorator (0.1)
commander (4.1.6)
fast-stemmer (1.0.2)
ffi (1.9.3)
highline (1.6.21)
io-console (0.4.2)
jekyll (1.4.3)
json (1.8.1)
liquid (2.5.5)
listen (1.3.1)
maruku (0.7.1)
minitest (4.7.5)
parslet (1.5.0)
posix-spawn (0.3.8)
psych (2.0.3)
pygments.rb (0.5.4)
rake (10.1.0)
rb-fsevent (0.9.4)
rb-inotify (0.9.3)
rb-kqueue (0.2.2)
rdoc (4.1.0)
redcarpet (2.3.0)
safe_yaml (0.9.7)
test-unit (2.1.1.0)
toml (0.1.1)
yajl-ruby (1.1.0)
$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.2.2
- RUBY VERSION: 2.1.1 (2014-02-24 patchlevel 76) [x86_64-darwin12.0]
- INSTALLATION DIRECTORY: /usr/local/Cellar/ruby/2.1.1/lib/ruby/gems/2.1.0
- RUBY EXECUTABLE: /usr/local/Cellar/ruby/2.1.1/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/Cellar/ruby/2.1.1/bin
- SPEC CACHE DIRECTORY: /Users/MyName/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /usr/local/Cellar/ruby/2.1.1/lib/ruby/gems/2.1.0
- /Users/MyName/.gem/ruby/2.1.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/bin
- /usr/local/bin
- /usr/local/sbin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/git/bin
- /Users/MyName/.rvm/bin
Please give me advice to help me. Thank you!
Updated on Mar 7.
$ rvm list
rvm rubies
# No rvm rubies installed yet. Try 'rvm help install'.
Just in case you would like to see Homebrew list,
$ brew list
autoconf gmp4 libtool openssl readline
automake libgpg-error libyaml pkg-config ruby
cloog-ppl015 libksba llvm ppl011 ruby-build
gcc46 libmpc08 mpfr2 rbenv
2nd updated on Mar 7.
$ which ruby
/usr/local/bin/ruby
$ which jekyll
/usr/bin/jekyll
$ ruby --version
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]
$ echo $PATH
/usr/local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Users/MyName/.rvm/bin
I remember that my mac had been installed Ruby 1.8.7 before I installed 2.1.1p76.
It looks like you have multiple versions of Ruby on your system (1.8.7 and 2.1.1), which is very common, and part of the reason tools like rvm and rbenv were created. The issue is that when you did gem install jekyll (maybe with a sudo) and sudo gem install json, these seem to have ended up in different spots and aren't finding each other. The /usr/local/bin location is typically where Homebrew puts things (hence, you have ruby listed under brew list) and this is your Ruby 2.1.1 location. However, your jekyll installation is under the location of the Apple-installed Ruby 1.8.7.
Step 1: try gem uninstall jekyll, then gem install jekyll. This should fix your problems.
Step 2: If that doesn't work, try to use rbenv or rvm to select a different version of Ruby, then try Step 1 again.
For example, my installations are here (managed via rvm):
$ which jekyll
/Users/nicksuch/.rvm/gems/ruby-2.0.0-p247/bin/jekyll
$ which gem
/Users/nicksuch/.rvm/rubies/ruby-2.0.0-p247/bin/gem
$ which ruby
/Users/nicksuch/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
In my case the Jekyll template suggested to use bundle utility as:
bundle exec jekyll build
The solution was to include json into Gemfile (which was already part of the sources):
diff --git a/Gemfile b/Gemfile
index 98b29af..b8537cf 100644
--- a/Gemfile
+++ b/Gemfile
## -1,7 +1,8 ##
source "https://rubygems.org"
+gem "json"
gem "jekyll", "~> 3.0"
gem "jekyll-sitemap"
DETAILS
What lead me to the solution was the following fact:
command gem list json showed json gem installed;
but command bundle exec gem list json didn't show anything.
I also tried to run bundle exec gem install json - it didn't work. My best guess was that bundle sets up the environment for a single run based on Gemfile which is the only way to make set of dependencies persistent across each bundle exec ... executions.

gem check errors (registered but missing gems) after installing ruby 2.0.0-p0 with rbenv install

Everything works fine with my installation of ruby 1.9.3.
$ rbenv global 1.9.3-p385
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.1.0)
io-console (0.3)
json (1.5.4)
minitest (2.5.1)
rake (0.9.2.2)
rdoc (3.9.5)
$ gem check
$
However after I installed ruby 2.0.0 with rbenv install, some strange error messages showed up in gem check.
$ rbenv install 2.0.0-p0
Downloading openssl-1.0.1e.tar.gz...
-> https://www.openssl.org/source/openssl-1.0.1e.tar.gz
Installing openssl-1.0.1e...
Installed openssl-1.0.1e to /Users/gogao/.rbenv/versions/2.0.0-p0
Downloading ruby-2.0.0-p0.tar.gz...
-> http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
Installing ruby-2.0.0-p0...
Installed ruby-2.0.0-p0 to /Users/gogao/.rbenv/versions/2.0.0-p0
$ rbenv global 2.0.0-p0
$ rbenv rehash
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.0)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
test-unit (2.0.0.0)
$ gem check
Checking gems...
bigdecimal-1.2.0.gem has 1 problems
bigdecimal-1.2.0:
Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/bigdecimal-1.2.0
io-console-0.4.2.gem has 1 problems
io-console-0.4.2:
Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/io-console-0.4.2
json-1.7.7.gem has 1 problems
json-1.7.7:
Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7
minitest-4.3.2.gem has 1 problems
minitest-4.3.2:
Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/minitest-4.3.2
psych-2.0.0.gem has 1 problems
psych-2.0.0:
Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/psych-2.0.0
rake-0.9.6.gem has 2 problems
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rake-0.9.6.gem:
missing gem file /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rake-0.9.6.gem
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/specifications/rake-0.9.6.gemspec:
Spec file missing for installed gem
rdoc-4.0.0.gem has 2 problems
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rdoc-4.0.0.gem:
missing gem file /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rdoc-4.0.0.gem
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/specifications/rdoc-4.0.0.gemspec:
Spec file missing for installed gem
test-unit-2.0.0.0.gem has 2 problems
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/test-unit-2.0.0.0.gem:
missing gem file /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/test-unit-2.0.0.0.gem
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/specifications/test-unit-2.0.0.0.gemspec:
Spec file missing for installed gem
$
Is it a known bug? or am i doing something wrong?
For Ruby 2.0.0-p0, I also get similar warnings from gem check. However, I don't have issues at runtime with any of these gems. I suspect this might be a bug with Rubygems check command in 2.0.0.
I have similar errors. Passing options to compiler fix installation.
Before install readline and openssl with Homebrew.
RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline)
--with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.0.0-p0
More info from Original Post

Resources