Closed storge-xx closed 11 years ago
...this is my first bur report in ages, and my first on git hub. i hope i didn't do it too poorly.
Not at all! The crapload of information you included was really helpful, it allowed me to be instantly certain that I'd screwed up! Nice one.
Turns out that in all the meticulous curation of the output of the commands, and all the tweaking of the website's design, I forgot to try uninstalling all my gems and reinstalling ppl to see if the installation worked. I'd completely omitted the gem's dependencies from the gemspec, which is a pretty brain dead stupid mistake to make.
I've amended that, and bumped the version number, so the following should hopefully get it running now:
$ sudo gem uninstall ppl
$ sudo gem install ppl
[crunchbang5010:storge] ~ $ sudo gem uninstall ppl
Select gem to uninstall:
3 Successfully uninstalled ppl-1.0.1 Remove executables: ppl
in addition to the gem? [Yn] y Removing ppl Successfully uninstalled ppl-1.0.3 [crunchbang5010:storge] ~ $ sudo gem install ppl Fetching: ppl-1.0.3.gem (100%) Successfully installed ppl-1.0.3 1 gem installed Installing ri documentation for ppl-1.0.3... Installing RDoc documentation for ppl-1.0.3... [crunchbang5010:storge] ~ $ ppl init ~/contacts ppl: undefined method `exists?' for Dir:Class [crunchbang5010:storge] ~ $
It seems I've used a method that doesn't exist in your version of Ruby. I have now updated the gemspec (see commit message for more details) to make the dependency on 1.9.3
explict.
Sorry that this isn't a more direct fix for the actual problem, but I don't want to act too rashly in that regard. I'm gonna take some time to look into it and see what nice way exists (if any) of working around the problem.
just an fyi: my system (crunchbang waldorf) had ruby1.8.x, i just went to 1.9.3* and this is my result.
[crunchbang5010:storge] ~ $ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
[crunchbang5010:storge] ~ $ sudo gem install ppl
ERROR: Error installing ppl:
ppl requires Ruby version = 1.9.3.
[crunchbang5010:storge] ~ $
*i did make sure to run:
sudo update-alternatives --config ruby
sudo update-alternatives --config gem
...to make sure it's all pointing to the 1.9.1 and not the 1.8. (1.9.1-for-1.9.3; all that odd versioning ruby uses). i may well have done something wrong--i'm rusty--but i provide fwiw.
Okay, this time I think the problem was that I was too strict about the required_ruby_version
of 1.9.3
. I've changed this to >= 1.9.3
so it should hopefully allow your version to install it.
Looks like by coincidence I'm using the exact version 1.9.3
which is how this slipped by:
h2s@blueprint:~/src/ppl [master] $ ruby --version
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
I can't thank you enough for your patience with me on this. I'm a bit of a noob when it comes to the intricacies of packaging gems, so I've made a lot of mistakes judging by this issue.
...closer...
[crunchbang5010:storge] ~ $ sudo gem install ppl
Fetching: ppl-1.0.5.gem (100%)
Successfully installed ppl-1.0.5
1 gem installed
Installing ri documentation for ppl-1.0.5...
Installing RDoc documentation for ppl-1.0.5...
[crunchbang5010:storge] ~ $ ppl init ~/contacts
[crunchbang5010:storge] ~ $ cd contacts/
[crunchbang5010:storge] ~/contacts $ ppl add monkey "Stinky Hardbrush"
ppl: Reference 'refs/heads/master' not found
[crunchbang5010:storge] ~/contacts $ ppl email monkey stinky@example.org
ppl: Reference 'refs/heads/master' not found
[crunchbang5010:storge] ~/contacts $ ppl phone monkey 1234567890
ppl: Reference 'refs/heads/master' not found
[crunchbang5010:storge] ~/contacts $
...i can be your crash test dummy...
I've taken a little longer than usual to reply about this one, I know. This appears to be a problem with the way Rugged handles git repository initialization. I think I did all my testing on an existing git repository and missed this.
Basically it's not creating the repository as you'd expect the vanilla CLI git init
command to do. Sadly its documentation is surprisingly poor for a Github-related project and so it's taking a while to figure out a fix.
I have found a genius solution to this. I have changed my quick start documentation to read like this:
Create An Address Book
$ git init ~/contacts
The whole ppl init
thing was there because of the predicted need to add some initial config files and so on to the repo in the first commit. That need never materialised so ppl init
isn't even necessary right now!
...maybe i'm misunderstanding you?
[crunchbang5010:storge] ~ $ rm -fr contacts
[crunchbang5010:storge] ~ $ git init ~/contacts
Initialized empty Git repository in /home/storge/contacts/.git/
[crunchbang5010:storge] ~ $ cd contacts/
[crunchbang5010:storge] ~/contacts $ ppl add monkey "Stinky Hardbrush"
ppl: Reference 'refs/heads/master' not found
[crunchbang5010:storge] ~/contacts $
...or should i have uninstalled/reinstalled the gem?
No wait, I'm being a little hasty here. I should have taken a minute to think before telling you that. I'm on coffee number three trying to keep up with all the activity so I guess I'm getting a little sloppy.
don't let me rush you, i'm just excited because i try to cli everything, but i'm into ten things here too :)
GitHub autoclosed the issue because I mentioned it in the commit message, but I don't want to close it just yet. I've sorted out the brokenness in ppl init
now, so this time I think you're good to go:
sudo gem uninstall ppl
sudo gem install ppl
rm -rf ~/contacts
ppl init ~/contacts
cd ~/contacts
ppl add test test@example.org
...here we go:
[crunchbang5010:storge] ~ $ sudo gem uninstall ppl && sudo gem install ppl
[sudo] password for storge:
Remove executables:
ppl
in addition to the gem? [Yn] y
Removing ppl
Successfully uninstalled ppl-1.0.5
Fetching: ppl-1.0.6.gem (100%)
Successfully installed ppl-1.0.6
1 gem installed
Installing ri documentation for ppl-1.0.6...
Installing RDoc documentation for ppl-1.0.6...
[crunchbang5010:storge] ~ $ rm -rf ~/contacts
[crunchbang5010:storge] ~ $ ppl init ~/contacts
[crunchbang5010:storge] ~ $ cd ~/contacts/
[crunchbang5010:storge] ~/contacts $ ppl add test test@example.org
[crunchbang5010:storge] ~/contacts $ ppl phone test 0123456789
[crunchbang5010:storge] ~/contacts $ ppl ls
test: test@example.org
[crunchbang5010:storge] ~/contacts $ ppl phone
test: 0123456789
[crunchbang5010:storge] ~/contacts $
ZING!
This makes me a very happy little hacker indeed. Thank you! :)
[crunchbang5010:storge] ~ $ sudo apt-get install rubygems git Reading package lists... Done Building dependency tree
Reading state information... Done git is already the newest version. rubygems is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. [crunchbang5010:storge] ~ $ sudo gem install ppl Successfully installed ppl-1.0.1 1 gem installed Installing ri documentation for ppl-1.0.1... Installing RDoc documentation for ppl-1.0.1... [crunchbang5010:storge] ~ $ ppl init ~/contacts /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
gem_original_require': no such file to load -- rugged (LoadError) from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
require' from /var/lib/gems/1.8/gems/ppl-1.0.1/lib/ppl/adapter/storage/git.rb:2 from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:ingem_original_require' from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
require' from /var/lib/gems/1.8/gems/ppl-1.0.1/lib/ppl.rb:30 from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:ingem_original_require' from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
require' from /var/lib/gems/1.8/gems/ppl-1.0.1/bin/ppl:8 from /usr/local/bin/ppl:23:in `load' from /usr/local/bin/ppl:23 [crunchbang5010:storge] ~ $...so that's pretty much all i know. ...i don't know what other detail you might require.
[crunchbang5010:storge] ~ $ cat /etc/debian_version wheezy/sid [crunchbang5010:storge] ~ $ cat /proc/version Linux version 3.6.0-10.dmz.1-liquorix-amd64 (Debian 3.6.0-10) (damentz@liquorix.net) (gcc version 4.7.2 (Debian 4.7.2-4) ) #1 ZEN SMP PREEMPT Wed Dec 12 03:35:17 UTC 2012
...this is my first bur report in ages, and my first on git hub. i hope i didn't do it too poorly.