I am completely new to Ruby, and I am having issues installing it on my Mac running Mountain Lion OS... any help would be great!!!
I have followed a tutorial, and I have installed GIT, curl and RVM. Next step is installing Ruby, which I tried but i got the following error
$ rvm install 1.9.2
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.2-p320.
It is not possible to build movable binaries for rubies 1.8-1.9.2, but you can do it for your system only.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing macports............
Error running 'requirements_osx_port_install_port',
showing last 15 lines of /Users/mikelgainza/.rvm/log/1388506081_ruby-1.9.2-p320/port_install.log
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking objc/objc.h usability... yes
checking objc/objc.h presence... yes
checking for objc/objc.h... yes
checking if linking libobjc requires pthreads... no
checking for Apple Objective-C runtime... yes
checking for GNU Objective C runtime... no
configure: Using Apple Objective-C runtime
checking for Apple Foundation library... no
configure: WARNING: GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library
configure: error: Could not find a working Foundation implementation
Requirements installation failed with status: 1.
I also tried to install 2.1.0 . It finds the remote but then it gives some errors
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/osx/10.8/x86_64/ruby-2.1.0.tar.bz2
Checking requirements for osx.
Installing macports............
Error running 'requirements_osx_port_install_port',
showing last 15 lines of /Users/mikelgainza/.rvm/log/1388512995_ruby-2.1.0/port_install.log
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking objc/objc.h usability... yes
checking objc/objc.h presence... yes
checking for objc/objc.h... yes
checking if linking libobjc requires pthreads... no
checking for Apple Objective-C runtime... yes
checking for GNU Objective C runtime... no
configure: Using Apple Objective-C runtime
checking for Apple Foundation library... no
configure: WARNING: GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library
configure: error: Could not find a working Foundation implementation
Requirements installation failed with status: 1.
Any idea of what am I doing wrong?
Thanks!
First, you'll need to install the Apple Developers Toolkit (XCode) from the Mac App Store (it's free)
Once that's installed, you'll need to install the CLI command line utilities by running:
xcode-select --install
Then try your install again, and it should work for you.
Additionally, you may want to install the latest version of Ruby, which at the time of this writing is 2.1.0 (via rvm install 2.1.0)
Finally, if you haven't already, I would recommend installing homebrew as well, as this has the added benefit of checking your runtime environment for errors (via brew doctor). You can find instructions here: http://brew.sh/
Good luck!
I have come across to similar problem
➜ ~ rvm install 2.3.0
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/osx/10.12/x86_64/ruby-2.3.0.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system - please wait
Error running 'requirements_osx_brew_update_system ruby-2.3.0',
showing last 15 lines of /Users/admin/.rvm/log/1481339734_ruby-2.3.0/update_system.log
+rvm_error:2> rvm_pretty_print stderr
+rvm_pretty_print:2> case auto (0|no)
+rvm_pretty_print:2> case auto (1|auto)
+rvm_pretty_print:7> case xterm-256color (dumb|unknown)
+rvm_pretty_print:10> case stderr (stdout)
+rvm_pretty_print:10> case stderr (stderr)
+rvm_pretty_print:12> [[ -t 2 ]]
+rvm_pretty_print:12> return 1
+rvm_error:4> printf %b 'Failed to update Homebrew, follow instructions here:
https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.\n'
Failed to update Homebrew, follow instructions here:
https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.
+requirements_osx_brew_update_system:25> return 1
Requirements installation failed with status: 1.
As been told in Jekyll's Doc,
I install Xcode Command-Line Tools
Installing Xcode Command-Line Tools
If you run into issues installing Jekyll's dependencies which make use of native extensions and are using macOS, you will need to install Xcode and the Command-Line Tools it ships with. Download them in Preferences → Downloads → Components.
And after install xcode-select:
xcode-select --install
then I install ruby 2.3.0 successfully.
➜ ~ rvm install 2.3.0
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.3.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/admin/.rvm/rubies/ruby-2.3.0, this may take a while depending on your cpu(s)...
ruby-2.3.0 - #downloading ruby-2.3.0, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0 13.5M 0 32283 0 0 4495 0 0:52:35 0:00:07 0:52:28 6 1 13.5M 1 143k 0 0 17673 0 0:13:22 0:00:08 0:13:14 28 1 13.5M 1 255k 0 0 28487 0 0:08:17 0:00:09 0:08:08 53 2 13.5M 2 351k 0 0 35391 0 0:06:40 0:00:10 0:06:30 80 3 13.5M 3 436k 0 0 39080 0 0:06:02 0:00:11 0:05:51 89 3 13.5M 3 495k 0 0 41702 0 0:05:40 0:00:12 0:05:28 95 4 13.5M 4 564k 0 0 43882 0 0:05:23 0:00:13 0:05:10 88 4 13.5M 4 623k 0 0 44999 0 0:05:15 0:00:14 0:05:01 75 4 13.5M 4 684k 0 0 46202 0 0:05:07 0:00:15 0:04:52 68 5 13.5M 5 735k 0 0 46462 0 0:05:05 0:00:16 0:04:49 64 5 13.5M 5 804k 0 0 47975 0 0:04:55 0:00:17 0:04:38 63 6 13.5M 6 879k 0 0 47817 0 0:04:56 0:00:18 0:04:38 56 6 13.5M 6 895k 0 0 47642 0 0:04:57 0:00:19 0:04:38 55 6 13.5M 6 948k 0 0 48109 0 0:04:54 0:00:20 0:04:34 53 7 13.5M 7 975k 0 0 47097 0 0:05:01 0:00:21 0:04:40 49 7 13.5M 7 1023k 0 0 47044 0 0:05:01 0:00:22 0:04:39 43 7 13.5M 7 1068k 0 0 47241 0 0:05:00 0:00:23 0:04:37 44 8 13.5M 8 1119k 0 0 47383 0 0:04:59 0:00:24 0:04:35 46 8 13.5M 8 1191k 0 0 48443 0 0:04:52 0:00:25 0:04:27 49 9 13.5M 9 1263k 0 0 49386 0 0:04:47 0:00:26 0:04:21 59 9 13.5M 9 1375k 0 0 51833 0 0:04:33 0:00:27 0:04:06 73 11 13.5M 11 1551k 0 0 56396 0 0:04:11 0:00:28 0:03:43 98 12 13.5M 12 1711k 0 0 59078 0 0:04:00 0:00:29 0:03:31 1 13 13.5M 13 1855k 0 0 62986 0 0:03:45 0:00:30 0:03:15 1 14 13.5M 14 1983k 0 0 65162 0 0:03:37 0:00:31 0:03:06 1 15 13.5M 15 2079k 0 0 66197 0 0:03:34 0:00:32 0:03:02 1 15 13.5M 15 2191k 0 0 67639 0 0:03:29 0:00:33 0:02:56 1 16 13.5M 16 2303k 0 0 69036 0 0:03:25 0:00:34 0:02:51 1 17 13.5M 17 2402k 0 0 69928 0 0:03:22 0:00:35 0:02:47 1 18 13.5M 18 2495k 0 0 70618 0 0:03:20 0:00:36 0:02:44 1 18 13.5M 18 2602k 0 0 71652 0 0:03:17 0:00:37 0:02:40 1 19 13.5M 19 2703k 0 0 72495 0 0:03:15 0:00:38 0:02:37 1 20 13.5M 20 2794k 0 0 72980 0 0:03:14 0:00:39 0:02:35 99 20 13.5M 20 2847k 0 0 72375 0 0:03:16 0:00:40 0:02:36 89 21 13.5M 21 2927k 0 0 72822 0 0:03:14 0:00:41 0:02:33 88 21 13.5M 21 3007k 0 0 73038 0 0:03:14 0:00:42 0:02:32 83 22 13.5M 22 3103k 0 0 73612 0 0:03:12 0:00:43 0:02:29 82 22 13.5M 22 3183k 0 0 73797 0 0:03:12 0:00:44 0:02:28 80 23 13.5M 23 3279k 0 0 74314 0 0:03:10 0:00:45 0:02:25 90 24 13.5M 24 3407k 0 0 75558 0 0:03:07 0:00:46 0:02:21 98 25 13.5M 25 3519k 0 0 76375 0 0:03:05 0:00:47 0:02:18 1 25 13.5M 25 3599k 0 0 76494 0 0:03:05 0:00:48 0:02:17 26 13.5M 26 3679k 0 0 76602 0 0:03:05 0:00:49 0:02:16 27 13.5M 27 3759k 0 0 76669 0 0:03:05 0:00:50 0:02:15 97 27 13.5M 27 3839k 0 0 76825 0 0:03:04 0:00:51 0:02:13 88 28 13.5M 28 3887k 0 0 76282 0 0:03:05 0:00:52 0:02:13 75 28 13.5M 28 3999k 0 0 77020 0 0:03:04 0:00:53 0:02:11 82 29 13.5M 29 4063k 0 0 76776 0 0:03:04 0:00:54 0:02:10 78 29 13.5M 29 4111k 0 0 75849 0 0:03:07 0:00:55 0:02:12 68 30 13.5M 30 4159k 0 0 75808 0 0:03:07 0:00:56 0:02:11 65 30 13.5M 30 4207k 0 0 75343 0 0:03:08 0:00:57 0:02:11 65 30 13.5M 30 4239k 0 0 74601 0 0:03:10 0:00:58 0:02:12 48 30 13.5M 30 4287k 0 0 74154 0 0:03:11 0:00:59 0:02:12 45 31 13.5M 31 4319k 0 0 73287 0 0:03:13 0:01:00 0:02:13 43 31 13.5M 31 4351k 0 0 72825 0 0:03:14 0:01:01 0:02:13 39 31 13.5M 31 4383k 0 0 72115 0 0:03:16 0:01:02 0:02:14 35 31 13.5M 31 4399k 0 0 71294 0 0:03:18 0:01:03 0:02:15 32 31 13.5M 31 4415k 0 0 70378 0 0:03:21 0:01:04 0:02:17 26 32 13.5M 32 4447k 0 0 69827 0 0:03:23 0:01:05 0:02:18 26 32 13.5M 32 4479k 0 0 69306 0 0:03:24 0:01:06 0:02:18 26 32 13.5M 32 4543k 0 0 69239 0 0:03:24 0:01:07 0:02:17 33 33 13.5M 33 4639k 0 0 69685 0 0:03:23 0:01:08 0:02:15 49 34 13.5M 34 4815k 0 0 71290 0 0:03:18 0:01:09 0:02:09 83 36 13.5M 36 5007k 0 0 72688 0 0:03:15 0:01:10 0:02:05 1 37 13.5M 37 5167k 0 0 74004 0 0:03:11 0:01:11 0:02:00 1 38 13.5M 38 5295k 0 0 74998 0 0:03:09 0:01:12 0:01:57 1 38 13.5M 38 5383k 0 0 74963 0 0:03:09 0:01:13 0:01:56 1 39 13.5M 39 5487k 0 0 75742 0 0:03:07 0:01:14 0:01:53 1 40 13.5M 40 5594k 0 0 76197 0 0:03:06 0:01:15 0:01:51 1 41 13.5M 41 5695k 0 0 76553 0 0:03:05 0:01:16 0:01:49 1 41 13.5M 41 5807k 0 0 77066 0 0:03:04 0:01:17 0:01:47 1 42 13.5M 42 5935k 0 0 77757 0 0:03:02 0:01:18 0:01:44 1 43 13.5M 43 6079k 0 0 78637 0 0:03:00 0:01:19 0:01:41 1 44 13.5M 44 6223k 0 0 79253 0 0:02:58 0:01:20 0:01:38 1 46 13.5M 46 6399k 0 0 80726 0 0:02:55 0:01:21 0:01:34 1 47 13.5M 47 6559k 0 0 81744 0 0:02:53 0:01:22 0:01:31 1 48 13.5M 48 6722k 0 0 82764 0 0:02:51 0:01:23 0:01:28 1 49 13.5M 49 6831k 0 0 83107 0 0:02:50 0:01:24 0:01:26 1 50 13.5M 50 6927k 0 0 83273 0 0:02:50 0:01:25 0:01:25 1 50 13.5M 50 7023k 0 0 83450 0 0:02:49 0:01:26 0:01:23 1 51 13.5M 51 7135k 0 0 83804 0 0:02:49 0:01:27 0:01:22 1 52 13.5M 52 7231k 0 0 83958 0 0:02:48 0:01:28 0:01:20 1 53 13.5M 53 7343k 0 0 84334 0 0:02:48 0:01:29 0:01:19 1 53 13.5M 53 7479k 0 0 84938 0 0:02:47 0:01:30 0:01:17 1 54 13.5M 54 7599k 0 0 85342 0 0:02:46 0:01:31 0:01:15 1 55 13.5M 55 7695k 0 0 85379 0 0:02:46 0:01:32 0:01:14 1 56 13.5M 56 7823k 0 0 85975 0 0:02:44 0:01:33 0:01:11 1 57 13.5M 57 7935k 0 0 86290 0 0:02:44 0:01:34 0:01:10 1 58 13.5M 58 8055k 0 0 86671 0 0:02:43 0:01:35 0:01:08 1 59 13.5M 59 8175k 0 0 86628 0 0:02:43 0:01:36 0:01:07 1 59 13.5M 59 8234k 0 0 86396 0 0:02:44 0:01:37 0:01:07 1 59 13.5M 59 8287k 0 0 86436 0 0:02:44 0:01:38 0:01:06 95 60 13.5M 60 8351k 0 0 86214 0 0:02:44 0:01:39 0:01:05 84 60 13.5M 60 8399k 0 0 85853 0 0:02:45 0:01:40 0:01:05 70 61 13.5M 61 8463k 0 0 85643 0 0:02:45 0:01:41 0:01:04 64 61 13.5M 61 8511k 0 0 85280 0 0:02:46 0:01:42 0:01:04 61 61 13.5M 61 8575k 0 0 84797 0 0:02:47 0:01:43 0:01:04 54 62 13.5M 62 8620k 0 0 84728 0 0:02:47 0:01:44 0:01:03 55 62 13.5M 62 8655k 0 0 84260 0 0:02:48 0:01:45 0:01:03 52 62 13.5M 62 8703k 0 0 83934 0 0:02:49 0:01:46 0:01:03 49 63 13.5M 63 8751k 0 0 83619 0 0:02:49 0:01:47 0:01:02 49 63 13.5M 63 8820k 0 0 83499 0 0:02:49 0:01:48 0:01:01 54 64 13.5M 64 8879k 0 0 83277 0 0:02:50 0:01:49 0:01:01 52 64 13.5M 64 8975k 0 0 83237 0 0:02:50 0:01:50 0:01:00 62 65 13.5M 65 9103k 0 0 83823 0 0:02:49 0:01:51 0:00:58 81 66 13.5M 66 9215k 0 0 84123 0 0:02:48 0:01:52 0:00:56 94 67 13.5M 67 9311k 0 0 84196 0 0:02:48 0:01:53 0:00:55 99 67 13.5M 67 9383k 0 0 84155 0 0:02:48 0:01:54 0:00:54 1 69 13.5M 69 9562k 0 0 85022 0 0:02:46 0:01:55 0:00:51 1 69 13.5M 69 9647k 0 0 85034 0 0:02:46 0:01:56 0:00:50 1 70 13.5M 70 9743k 0 0 85136 0 0:02:46 0:01:57 0:00:49 1 70 13.5M 70 9807k 0 0 84892 0 0:02:47 0:01:58 0:00:49 71 13.5M 71 9871k 0 0 84803 0 0:02:47 0:01:59 0:00:48 99 71 13.5M 71 9951k 0 0 84732 0 0:02:47 0:02:00 0:00:47 78 72 13.5M 72 9.7M 0 0 84620 0 0:02:47 0:02:01 0:00:46 75 72 13.5M 72 9.8M 0 0 84319 0 0:02:48 0:02:02 0:00:46 65 73 13.5M 73 9.9M 0 0 84331 0 0:02:48 0:02:03 0:00:45 70 73 13.5M 73 9.9M 0 0 84179 0 0:02:48 0:02:04 0:00:44 69 74 13.5M 74 10.0M 0 0 84134 0 0:02:48 0:02:05 0:00:43 69 74 13.5M 74 10.1M 0 0 84139 0 0:02:48 0:02:06 0:00:42 72 75 13.5M 75 10.1M 0 0 83940 0 0:02:48 0:02:07 0:00:41 74 75 13.5M 75 10.2M 0 0 83849 0 0:02:49 0:02:08 0:00:41 71 76 13.5M 76 10.3M 0 0 83963 0 0:02:48 0:02:09 0:00:39 78 77 13.5M 77 10.4M 0 0 83941 0 0:02:48 0:02:10 0:00:38 79 77 13.5M 77 10.5M 0 0 84059 0 0:02:48 0:02:11 0:00:37 82 78 13.5M 78 10.6M 0 0 84159 0 0:02:48 0:02:12 0:00:36 89 79 13.5M 79 10.7M 0 0 84391 0 0:02:48 0:02:13 0:00:35 98 80 13.5M 80 10.8M 0 0 84570 0 0:02:47 0:02:14 0:00:33 98 81 13.5M 81 10.9M 0 0 85208 0 0:02:46 0:02:15 0:00:31 1 82 13.5M 82 11.1M 0 0 85664 0 0:02:45 0:02:16 0:00:29 1 83 13.5M 83 11.2M 0 0 86230 0 0:02:44 0:02:17 0:00:27 1 84 13.5M 84 11.4M 0 0 86908 0 0:02:43 0:02:18 0:00:25 1 85 13.5M 85 11.6M 0 0 87583 0 0:02:41 0:02:19 0:00:22 1 86 13.5M 86 11.7M 0 0 87985 0 0:02:41 0:02:20 0:00:21 1 87 13.5M 87 11.8M 0 0 87953 0 0:02:41 0:02:21 0:00:20 1 88 13.5M 88 11.9M 0 0 88270 0 0:02:40 0:02:22 0:00:18 1 89 13.5M 89 12.0M 0 0 88200 0 0:02:40 0:02:23 0:00:17 1 89 13.5M 89 12.1M 0 0 88115 0 0:02:40 0:02:24 0:00:16 1 89 13.5M 89 12.1M 0 0 87903 0 0:02:41 0:02:25 0:00:16 85 90 13.5M 90 12.2M 0 0 87757 0 0:02:41 0:02:26 0:00:15 82 90 13.5M 90 12.3M 0 0 87450 0 0:02:42 0:02:27 0:00:15 65 91 13.5M 91 12.3M 0 0 87557 0 0:02:42 0:02:28 0:00:14 69 91 13.5M 91 12.4M 0 0 87413 0 0:02:42 0:02:29 0:00:13 67 92 13.5M 92 12.5M 0 0 87388 0 0:02:42 0:02:30 0:00:12 72 93 13.5M 93 12.5M 0 0 87348 0 0:02:42 0:02:31 0:00:11 75 93 13.5M 93 12.6M 0 0 87195 0 0:02:42 0:02:32 0:00:10 79 94 13.5M 94 12.7M 0 0 87167 0 0:02:42 0:02:33 0:00:09 75 94 13.5M 94 12.8M 0 0 87134 0 0:02:42 0:02:34 0:00:08 78 95 13.5M 95 12.8M 0 0 87050 0 0:02:42 0:02:35 0:00:07 76 95 13.5M 95 12.9M 0 0 86859 0 0:02:43 0:02:36 0:00:07 72 96 13.5M 96 12.9M 0 0 86694 0 0:02:43 0:02:37 0:00:06 71 96 13.5M 96 13.0M 0 0 86546 0 0:02:43 0:02:38 0:00:05 67 96 13.5M 96 13.1M 0 0 86347 0 0:02:44 0:02:39 0:00:05 62 97 13.5M 97 13.1M 0 0 86325 0 0:02:44 0:02:40 0:00:04 63 98 13.5M 98 13.2M 0 0 86303 0 0:02:44 0:02:41 0:00:03 68 99 13.5M 99 13.4M 0 0 86680 0 0:02:43 0:02:42 0:00:01 86100 13.5M 100 13.5M 0 0 87104 0 0:02:42 0:02:42 --:--:-- 103k
ruby-2.3.0 - #extracting ruby-2.3.0 to /Users/admin/.rvm/src/ruby-2.3.0 - please wait
ruby-2.3.0 - #configuring - please wait
ruby-2.3.0 - #post-configuration - please wait
ruby-2.3.0 - #compiling - please wait
ruby-2.3.0 - #installing - please wait
ruby-2.3.0 - #making binaries executable - please wait
Installed rubygems 2.5.1 is newer than 2.4.8 provided with installed ruby, skipping installation, use --force to force installation.
ruby-2.3.0 - #gemset created /Users/admin/.rvm/gems/ruby-2.3.0#global
ruby-2.3.0 - #importing gemset /Users/admin/.rvm/gemsets/global.gems - please wait
ruby-2.3.0 - #generating global wrappers - please wait
ruby-2.3.0 - #gemset created /Users/admin/.rvm/gems/ruby-2.3.0
ruby-2.3.0 - #importing gemsetfile /Users/admin/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.3.0 - #generating default wrappers - please wait
ruby-2.3.0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.3.0 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
Error running 'requirements_debian_update_system ruby-2.5.1',
please read /home/ivliev/.rvm/log/1525444837_ruby-2.5.1/update_system.log
Requirements installation failed with status: 1.
decision:
sudo apt-get update
delete the falling packages, and then run it again
look at the available packages
rvm list known
if necessary there is no. update package list
rvm get master
install the desired ruby
rvm install "ruby-2.5.1"
I got the same error - for me it was a problem with Homebrew - the last lines of the command logs said:
++ printf %b 'Failed to update Homebrew, follow instructions here:
https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.\n'
So then I ran brew update which then gave me another error message with instructions on how to fix it. After I followed brew's instructions I was able to install Ruby.
Related
I do not want to wait for Oracle DataDump expdb to finish writing to dump file.
So I start reading data from the moment it's created.
Then I write this data to another file.
It worked ok - file sizes are the same (the one that OracleDump created and the one my data monitoring script created).
But when I run cmp it shows difference in 27 bytes:
cmp -l ora.dmp monitor_10k_rows.dmp
3 263 154
4 201 131
5 174 173
6 103 75
48 64 70
58 0 340
64 0 1
65 0 104
66 0 110
541 60 61
545 60 61
552 60 61
559 60 61
20508 0 15
20509 0 157
20510 0 230
20526 0 10
20532 0 15
20533 0 225
20534 0 150
913437 0 226
913438 0 37
913454 0 10
913460 0 1
913461 0 104
913462 0 100
ls -al ora.dmp
-rw-r--r-- 1 oracle oinstall 999424 Jun 20 11:35 ora.dmp
python -c 'print 999424-913462'
85962
od ora.dmp -j 913461 -N 1
3370065 000100
3370066
od monitor_10k_rows.dmp -j 913461 -N 1
3370065 000000
3370066
Even if I extract more data the difference is still 27 bytes but different addresses/values:
cmp -l ora.dmp monitor_30k_rows.dmp
3 245 134
4 222 264
5 377 376
6 54 45
48 36 43
57 0 2
58 0 216
64 0 1
65 0 104
66 0 120
541 60 61
545 60 61
552 60 61
559 60 61
20508 0 50
20509 0 126
20510 0 173
20526 0 10
20532 0 50
20533 0 174
20534 0 120
2674717 0 226
2674718 0 47
2674734 0 10
2674740 0 1
2674741 0 104
2674742 0 110
Some writes are the same.
Is there a way know addresses of bytes which will differ?
ls -al ora.dmp
-rw-r--r-- 1 bicadmin bic 2760704 Jun 20 11:09 ora.dmp
python -c 'print 2760704-2674742'
85962
How can update my monitored copy after DataDump updated the original at adress 2674742 using Python for example?
Exact same thing happens if I use COMPRESSION=DATA_ONLY option.
Update: Figured how to sync bytes that differ between 2 files:
def patch_file(fn, diff):
for line in diff.split(os.linesep):
if line:
addr, to_octal, _ = line.strip().split()
with open(fn , 'r+b') as f:
f.seek(int(addr)-1)
f.write(chr(int (to_octal,8)))
diff="""
3 157 266
4 232 276
5 272 273
6 16 25
48 64 57
58 340 0
64 1 0
65 104 0
66 110 0
541 61 60
545 61 60
552 61 60
559 61 60
20508 15 0
20509 157 0
20510 230 0
20526 10 0
20532 15 0
20533 225 0
20534 150 0
913437 226 0
913438 37 0
913454 10 0
913460 1 0
913461 104 0
913462 100 0
"""
patch_file(f3,diff)
wrote a patch using Python:
addr=[3 , 4 , 5 , 6 , 48 , 58 , 64 , 65 , 66 , 541 , 545 , 552 , 559 , 20508 , 20509 , 20510 , 20526 , 20532 , 20533 , 20534 ]
last_range=[85987, 85986, 85970, 85964, 85963, 85962]
def get_bytes(addr):
out =[]
with open(f1 , 'r+b') as f:
for a in addr:
f.seek(a-1)
data= f.read(1)
hex= binascii.hexlify(data)
binary = int(hex, 16)
octa= oct(binary)
out.append((a,octa))
return out
def patch_file(fn, bytes_to_update):
with open(fn , 'r+b') as f:
for (a,to_octal) in bytes_to_update:
print (a,to_octal)
f.seek(int(a)-1)
f.write(chr(int (to_octal,8)))
if 1:
from_file=f1
fsize=os.stat(from_file).st_size
bytes_to_read = addr + [fsize-x for x in last_range]
bytes_to_update = get_bytes(bytes_to_read)
to_file =f3
patch_file(to_file,bytes_to_update)
The reason I do dmp file monitoring is because it cuts backup time in half.
I am using bufio to append byte arrays to a file. When I use cat on it I get:
[176 0 0 0 4 0 0 0 1 0 0 0 57 12 127 47 4 0 0 0 1 0 0 0 215 136 47 0 64 0 0 0 2 0 0 0 57 0 97 0 53 0 52 0 100 0 98 0 99 0 52 0 98 0 100 0 100 0 49 0 54 0 99 0 49 0 97 0 49 0 57 0 56 0 48 0 52 0 55 0 53 0 49 0 100 0 49 0 49 0 51 0 99 0 52 0 52 0 98 0 24 0 0 0 2 0 0 0 83 0 111 0 109 0 101 0 32 0 99 0 108 0 105 0 101 0 110 0 116 0 0 0 36 0 0 0 2 0 0 0 83 0 111 0 109 0 101 0 32 0 111 0 116 0 104 0 101 0 114 0 32 0 112 0 97 0 114 0 116 0 110 0 101 0 114 0][176 0 0 0 4 0 0 0 1 0 0 0 4 162 127 47 4 0 0 0 1 0 0 0 215 136 47 0 64 0 0 0 2 0 0 0 57 0 97 0 53 0 52 0 100 0 98 0 99 0 52 0 98 0 100 0 100 0 49 0 54 0 99 0 49 0 97 0 49 0 57 0 56 0 48 0 52 0 55 0 53 0 49 0 100 0 49 0 49 0 51 0 99 0 52 0 52 0 98 0 24 0 0 0 2 0 0 0 83 0 111 0 109 0 101 0 32 0 99 0 108 0 105 0 101 0 110 0 116 0 0 0 36 0 0 0 2 0 0 0 83 0 111 0 109 0 101 0 32 0 111 0 116 0 104 0 101 0 114 0 32 0 112 0 97 0 114 0 116 0 110 0 101 0 114 0][176 0 0 0 4 0 0 0 1 0 0 0 35 200 127 47 4 0 0 0 1 0 0 0 215 136 47 0 64 0 0 0 2 0 0 0 57 0 97 0 53 0 52 0 100 0 98 0 99 0 52 0 98 0 100 0 100 0 49 0 54 0 99 0 49 0 97 0 49 0 57 0 56 0 48 0 52 0 55 0 53 0 49 0 100 0 49 0 49 0 51 0 99 0 52 0 52 0 98 0 24 0 0 0 2 0 0 0 83 0 111 0 109 0 101 0 32 0 99 0 108 0 105 0 101 0 110 0 116 0 0 0 36 0 0 0 2 0 0 0 83 0 111 0 109 0 101 0 32 0 111 0 116 0 104 0 101 0 114 0 32 0 112 0 97 0 114 0 116 0 110 0 101 0 114 0]
So arrays of bytes. Now I want to read the file into memory, so I use:
content, err := ioutil.ReadFile(filename)
But when I display the content variable I get a completely different output than the contents of the file (and one array instead of many). What's wrong?
You wrote it wrong to the file. Its human readable format, should be binary.
My guess you used something like fmt.Fprintln(file, byte_slice) or variants.
It must be fmt.Fprintf(file, "%s", byte_slice) or similar.
Please, show us code how you write to the file.
So what think is happening is that the content inside of that file is a string. When you pull it out of the file it converts that string to bytes. What you need to do is convert those bytes to a string before you append to the file and then convert them back when you pull from the file
https://play.golang.org/p/PyBXAU9rVW
I have a matrix that is 50x2. But column 2 has different amount of entries. How can I make a box plot where the x axis is position and the y axis are the different counts? Ideally, I'd like to take the absolute value of the counts. Thanks in advance!
> mat.count[1:50,]
position count
1 136873135 0
2 136873136 0
3 136873137 0
4 136873138 0
5 136873139 0
6 136873140 -15
7 136873141 0
8 136873142 0
9 136873143 0
10 136873144 0
11 136873145 0
12 136873146 0
13 136873147 0
14 136873148 0
15 136873149 0
16 136873150 0
17 136873151 0
18 136873152 0
19 136873153 0
20 136873154 0
21 136873155 0
22 136873156 0
23 136873157 0
24 136873158 0
25 136873159 0
26 136873160 0
27 136873161 0
28 136873162 0
29 136873163 0
30 136873164 0
31 136873165 0
32 136873166 0
33 136873167 0
34 136873168 -1
35 136873169 0
36 136873170 0
37 136873171 0
38 136873172 0
39 136873173 -70
40 136873174 -66
41 136873175 -73,-1,-1,-1,-73,-1
42 136873176 -52
43 136873177 0
44 136873178 0
45 136873179 -66,-1
46 136873180 -1
47 136873181 0
48 136873182 -68,-75
49 136873183 -67,-67
50 136873184 -60,-56,-56
Is there a limitation in exiv2's functionality that prevents it from inserting the tag 'Exif.SubImage1.OpcodeList3' to a DNG file?
I am trying to copy this tag from one DNG file to another with no success.
My source file was printed using:
exiv2.exe -b -pa file.dng > output.txt
The file output.txt contains:
Exif.SubImage1.OpcodeList3 Undefined 184 0 0 0 1 0 0 0 1 1 3 0 0 0 0 0 0 0 0 0 164 0 0 0 3 63 240 0 0 119 176 58 28 191 185 132 79 191 248 95 209 63 154 58 10 83 149 62 10 191 117 109 20 1 60 213 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 63 240 0 0 0 0 0 6 191 185 168 230 29 114 106 51 63 154 226 203 140 13 160 159 191 117 201 88 36 225 127 123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 63 239 255 253 213 88 87 206 191 185 163 231 88 112 250 50 63 155 248 100 114 115 143 207 191 118 115 180 47 58 216 144 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 63 223 227 192 112 254 60 7 63 224 0 0 0 0 0 0
I'm trying to add this tag to a different DNG file that doesn't have it by (for example) a command file:
add Exif.SubImage1.OpcodeList3 Undefined "0 0 0 1 0 0 0 1 1 3 0 0 0 0 0 0 0 0 0 164 0 0 0 3 63 240 0 0 119 176 58 28 191 185 132 79 191 248 95 209 63 154 58 10 83 149 62 10 191 117 109 20 1 60 213 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 63 240 0 0 0 0 0 6 191 185 168 230 29 114 106 51 63 154 226 203 140 13 160 159 191 117 201 88 36 225 127 123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 63 239 255 253 213 88 87 206 191 185 163 231 88 112 250 50 63 155 248 100 114 115 143 207 191 118 115 180 47 58 216 144 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 63 223 227 192 112 254 60 7 63 224 0 0 0 0 0 0"
But the file remains unchanged.
I also tried things like: add Exif.SubImage1.OpcodeList3 Undefined "0 0 0 1 0"
But still the tag is not added. I suspect that exiv2 doesn't support the insertion of this tag.
Am I doing something wrong or is this not supported?
Problem solved: the answer here (with respect to OpcodeList1) explains why such a tag is not manipulated by exiv2. To overcome this, I changed tiffimage.cpp by replacing:
if ( pPrimaryGroups != 0
&& !pPrimaryGroups->empty()
&& group != ifd0Id) {
#ifdef DEBUG
ExifKey key(tag, groupName(group));
std::cerr << "Image tag: " << key << " (2)\n";
#endif
return true;
}
with:
if ( pPrimaryGroups != 0
&& !pPrimaryGroups->empty()
&& group != ifd0Id) {
bool opcode3 = tag == 0xc74e;
#ifdef DEBUG
ExifKey key(tag, groupName(group));
if (!opcode3)
std::cerr << "Image tag: " << key << " (2)\n";
else
std::cerr << "Not an image tag: " << key << " (2)\n";
#endif
return !opcode3;
}
I am trying to integrate the TestFlighApp.com API with my TeamCity continuous integration environment. However, after the .ipa is generated and I get to the following step:
curl http://testflightapp.com/api/builds.json \
--form file=#%teamcity.build.checkoutDir%/application.ipa \
--form api_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
--form team_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
--form notes='Built from TeamCity. %env.TEAMCITY_BUILDCONF_NAME%' \
--form notify=True \
--form distribution_lists='API'
I get the following results:
Step 3/4: Distribute to TestFlight (Command Line) (1m)
Starting: /Applications/buildAgent/temp/agentTmp/custom_script2782333615207409098
in directory: /Applications/buildAgent/work/7a1d432fea96afc0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
89 985 0 0 89 883 0 759 0:00:01 0:00:01 --:--:-- 815
89 985 0 0 89 883 0 408 0:00:02 0:00:02 --:--:-- 423
89 985 0 0 89 883 0 279 0:00:03 0:00:03 --:--:-- 286
89 985 0 0 89 883 0 211 0:00:04 0:00:04 --:--:-- 216
89 985 0 0 89 883 0 170 0:00:05 0:00:05 --:--:-- 173
89 985 0 0 89 883 0 143 0:00:06 0:00:06 --:--:-- 0
89 985 0 0 89 883 0 123 0:00:08 0:00:07 0:00:01 0
89 985 0 0 89 883 0 108 0:00:09 0:00:08 0:00:01 0
89 985 0 0 89 883 0 96 0:00:10 0:00:09 0:00:01 0
89 985 0 0 89 883 0 86 0:00:11 0:00:10 0:00:01 0
89 985 0 0 89 883 0 79 0:00:12 0:00:11 0:00:01 0
89 985 0 0 89 883 0 72 0:00:13 0:00:12 0:00:01 0
89 985 0 0 89 883 0 67 0:00:14 0:00:13 0:00:01 0
89 985 0 0 89 883 0 62 0:00:15 0:00:14 0:00:01 0
89 985 0 0 89 883 0 58 0:00:16 0:00:15 0:00:01 0
89 985 0 0 89 883 0 54 0:00:18 0:00:16 0:00:02 0
89 985 0 0 89 883 0 51 0:00:19 0:00:17 0:00:02 0
89 985 0 0 89 883 0 48 0:00:20 0:00:18 0:00:02 0
89 985 0 0 89 883 0 46 0:00:21 0:00:19 0:00:02 0
89 985 0 0 89 883 0 43 0:00:22 0:00:20 0:00:02 0
89 985 0 0 89 883 0 41 0:00:24 0:00:21 0:00:03 0
89 985 0 0 89 883 0 39 0:00:25 0:00:22 0:00:03 0
89 985 0 0 89 883 0 38 0:00:25 0:00:23 0:00:02 0
89 985 0 0 89 883 0 36 0:00:27 0:00:24 0:00:03 0
89 985 0 0 89 883 0 35 0:00:28 0:00:25 0:00:03 0
89 985 0 0 89 883 0 33 0:00:29 0:00:26 0:00:03 0
89 985 0 0 89 883 0 32 0:00:30 0:00:27 0:00:03 0
89 985 0 0 89 883 0 31 0:00:31 0:00:28 0:00:03 0
89 985 0 0 89 883 0 30 0:00:32 0:00:29 0:00:03 0
89 985 0 0 89 883 0 29 0:00:33 0:00:30 0:00:03 0
89 985 0 0 89 883 0 28 0:00:35 0:00:31 0:00:04 0
89 985 0 0 89 883 0 27 0:00:36 0:00:32 0:00:04 0
89 985 0 0 89 883 0 26 0:00:37 0:00:33 0:00:04 0
89 985 0 0 89 883 0 25 0:00:39 0:00:34 0:00:05 0
89 985 0 0 89 883 0 25 0:00:39 0:00:35 0:00:04 0
89 985 0 0 89 883 0 24 0:00:41 0:00:36 0:00:05 0
89 985 0 0 89 883 0 23 0:00:42 0:00:37 0:00:05 0
89 985 0 0 89 883 0 23 0:00:42 0:00:38 0:00:04 0
89 985 0 0 89 883 0 22 0:00:44 0:00:39 0:00:05 0
89 985 0 0 89 883 0 21 0:00:46 0:00:40 0:00:06 0
89 985 0 0 89 883 0 21 0:00:46 0:00:41 0:00:05 0
89 985 0 0 89 883 0 20 0:00:49 0:00:42 0:00:07 0
89 985 0 0 89 883 0 20 0:00:49 0:00:43 0:00:06 0
89 985 0 0 89 883 0 19 0:00:51 0:00:44 0:00:07 0
89 985 0 0 89 883 0 19 0:00:51 0:00:45 0:00:06 0
89 985 0 0 89 883 0 19 0:00:51 0:00:46 0:00:05 0
89 985 0 0 89 883 0 18 0:00:54 0:00:47 0:00:07 0
89 985 0 0 89 883 0 18 0:00:54 0:00:48 0:00:06 0
89 985 0 0 89 883 0 17 0:00:57 0:00:49 0:00:08 0
89 985 0 0 89 883 0 17 0:00:57 0:00:50 0:00:07 0
89 985 0 0 89 883 0 17 0:00:57 0:00:51 0:00:06 0
89 985 0 0 89 883 0 16 0:01:01 0:00:52 0:00:09 0
89 985 0 0 89 883 0 16 0:01:01 0:00:53 0:00:08 0
89 985 0 0 89 883 0 16 0:01:01 0:00:54 0:00:07 0
89 985 0 0 89 883 0 15 0:01:05 0:00:55 0:00:10 0
89 985 0 0 89 883 0 15 0:01:05 0:00:56 0:00:09 0
89 985 0 0 89 883 0 15 0:01:05 0:00:57 0:00:08 0
89 985 0 0 89 883 0 15 0:01:05 0:00:58 0:00:07 0
89 985 0 0 89 883 0 14 0:01:10 0:00:59 0:00:11 0
89 985 0 0 89 883 0 14 0:01:10 0:01:00 0:00:10 0
89 985 0 0 89 883 0 14 0:01:10 0:01:00 0:00:10 0
curl: (52) Empty reply from server
Process exited with code 52
Step Distribute to TestFlight (Command Line) failed
Any assistance with this would be GREATLY appreciated!
Thanks
Ryan