Skip to content

Instantly share code, notes, and snippets.

View mpapis's full-sized avatar
🙃
I am slow to respond, ping me when it's crucial.

Michal Papis mpapis

🙃
I am slow to respond, ping me when it's crucial.
  • Opensource, AKRA Polska
  • Gliwice, Poland
View GitHub Profile
@mpapis
mpapis / console.sh
Created November 7, 2011 02:15
rvm use 1.9.2@testrun # status=0 ; status=1
=====cmd:start="rvm use 1.9.2@testrun"=
Using /home/mpapis/.rvm/gems/ruby-1.9.2-p290 with gemset testrun
=====cmd:stop=
=====cmd:exit_status=0=
=====cmd:env:start=
NNTPSERVER=news
MANPATH=/home/mpapis/share/man:/usr/local/man:/usr/share/man:/usr/man
reinstall_flag=1
rvm_dump_environment_flag=0
SSH_AGENT_PID=2182
@mpapis
mpapis / console.sh
Created November 7, 2011 02:15
Complete Report
commandtimings--- !ruby/object:Benchmark::Tms
label: ''
real: 0.2333388328552246
cstime: 0.0
cutime: 0.0
stime: 0.0
utime: 0.0
total: 0.0
test_failed0os_typeLinuxerror_msgcreated_at2011-11-07T03:15:47+01:00updated_at2011-11-07T03:15:47+01:00env_closing---
:NNTPSERVER: news
rbx-head-d19@thor mpapis@niczsoft:~/tmp/ad>gem install thor --version 0.14.0
An exception occurred running /home/mpapis/.rvm/rubies/rbx-head-d19/lib/bin/gem.rb
Missing or uninitialized constant: Gem::SourceIndex (NameError)
Backtrace:
Module#const_missing at kernel/common/module.rb:524
Gem.source_index at /home/mpapis/.rvm/rubies/rbx-head-d19
/lib/rubygems.rb:964
Gem::GemPathSearcher#init_gemspecs at /home/mpapis/.rvm/rubies/rbx-head-d19
/lib/rubygems/gem_path_searcher.rb:83
@mpapis
mpapis / .rvmrc
Created November 21, 2011 14:09 — forked from hedgehog/.rvmrc
rvmrc issue
#!/usr/bin/env bash
# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
ruby_id='ruby-1.9.2-p290'
gemset_id='proj'
environment_id="${ruby_id}@${gemset_id}"
@mpapis
mpapis / possible_functions_for_installer.sh
Created December 14, 2011 01:36
rvm post_install action for setting up env.
create_install_paths
print_install_header
configure_installation
cleanse_old_entities
install_rvm_files
@mpapis
mpapis / version_compre.sh
Created January 5, 2012 21:44
shell version compare - call me crazy
__rvm_version_compare()
{
typeset v1 v2 v1d v2d dots x counter IFS
typeset -a transformer
v1=$1
v2=$3
v1d=$( printf $v1 | grep -o '\.' | wc -l )
v2d=$( printf $v2 | grep -o '\.' | wc -l )
if [[ $v1d -ge $v2d ]]
#!/usr/bin/env bash
# put this in /usr/bin/ruby-env and do not forget to chmod +x it
# then jsut shebang: #!/usr/bin/ruby-env 1.9.3
export HOME="${HOME%%+(\/)}" # Remove trailing slashes if they exist on HOME
if (( ${rvm_ignore_rvmrc:=0} == 0 ))
then
for rvmrc in /etc/rvmrc "$HOME/.rvmrc"
@mpapis
mpapis / console.sh
Created January 16, 2012 13:28
rvm use 1.9.9999 # status=1; status!=0; match=~/WARN.*is not installed/
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
Tests(failed 3):
failed: status = 1 # was 0
failed: status != 0 # was 0
failed: match = /WARN.*is not installed/
@mpapis
mpapis / console.sh
Created January 16, 2012 13:28
rvm use 1.9.2@testrun # status=0 ; status=1
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
Tests(failed 1):
passed: status = 0
failed: status = 1 # was 0
@mpapis
mpapis / console.sh
Created January 16, 2012 13:28
Complete Report
commandtimings--- !ruby/object:Benchmark::Tms
label: ''
real: 0.18400263786315918
cstime: 0.0
cutime: 0.0
stime: 0.0
utime: 0.0
total: 0.0
test_failed3os_typeLinuxerror_msg
RVM is not a function, selecting rubies with 'rvm use ...' will not work.