pccasto / rubyripper

Automatically exported from code.google.com/p/rubyripper
0 stars 0 forks source link

Trouble compiling, any advice? #266

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. /etc/rubyripper/rubyripper-0.5.4$ sudo ./configure --enable-lang-all 
--enable-gtk2 --
enable-cli --prefix=/usr
2.
3.

What is the expected output? 

Compiling ok

What do you see instead?

Error as follows:

./rr_lib.rb:19: undefined method `+' for nil:NilClass (NoMethodError)
    from ./configure:37:in `require'
    from ./configure:37

1) What version of rubyripper are you using? Trying to compile 0.5.4 to create 
a rrip_gui 
executable: I can seemingly run this version OK using this command from the 
prompt:

/etc/rubyripper/rubyripper-0.5.4/rubyripper_gtk2.rb

but when I invoke rrip_gui instead, the old version I had installed runs.

On what operating system?
Linux - UBUNTU 8.10
2) Are you using the gtk2 or the commandline interface?

CLI to compile, trying to compile the GUI version

3) Is the problem gone with the default settings? If so, please attach your 
settings file 
($HOME/.rubyripper/settings).

Please provide any additional information below.

How do I upgrade from 0.5.0 to 0.5.4 and get rrip_gui to run Rubyripper as it 
did with the 
previous version? And how do I remove the previous version?

Original issue reported on code.google.com by Jer....@gmail.com on 7 Jan 2009 at 2:05

GoogleCodeExporter commented 8 years ago
The error you get shouldn't be there in 0.5.4 anymore.

I suspect your old install is still in the way. To uninstall rubyripper depends 
on
what you installed it with. 

If you used the make script (make install), you should now use the make script 
again
(make uninstall).

If you used a package manager of your distro, you should use that again to 
remove the
package.

If uninstalling doesn't solve the problem, I will have a look at the code.

Original comment by rubyripp...@gmail.com on 7 Jan 2009 at 7:34

GoogleCodeExporter commented 8 years ago
Thanks for the follow-up. I'm trying to follow your suggestions. 

I originally installed 0.5.0 using ./configure etc. I haven't been able to get 
git to work for me.

(I am not a developer and I'm not too familiar with some of these environments 
and commands.)

I wasn't able to get a clean run of make uninstall - I had deleted some files 
manually and then the uninstall 
script exited with errors when it couldn't find these files. I tried putting 
dummy files in the appropriate places 
using touch, but I never got all the way through the script.

Next I tried removing everything manually by looking through the Makefile, and 
I deleted everything I could 
find. I am not sure whether I have done a complete uninstall at this point. 

Then I tried the configure command described above in my rubyripper-0.5.4 
directory and I got the same 
error as I described above.

I'd say don't look at the code just yet. My current workaround is to put the 
complete path and command 
(/etc/rubyripper/rubyripper-0.5.4/rubyripper_gtk2.rb) into a desktop launcher 
instead of invoking rrip_gui, 
and this is working for now. I deleted the Makefile for 0.5.0 so now I'll try 
extracting the tarball of 0.5.0 so I 
can read the Makefile's uninstall section. Then I guess I'll go looking for 
files and removing manually more 
thoroughly again. One thing that made me concerned: do I really want to delete 
library files like 
/usr/lib/site_ruby/1.8/rr_lib.rb

??

Original comment by Jer....@gmail.com on 7 Jan 2009 at 4:06

GoogleCodeExporter commented 8 years ago
I just looked in the 0.5.4 directory for the Makefile and it's not there. That 
leads me to believe I'd have to 
configure and install 0.5.0 before the 0.5.0 Makefile will be created. I don't 
think I want to do this and go back to 
where I started. Can you provide me with the Uninstall section of the Makefile 
for 0.5.0 to follow instead of me 
doing another 0.5.0 installation process please? Or is there a way to generate 
the makefile without actually 
installing?

Original comment by Jer....@gmail.com on 7 Jan 2009 at 4:13

GoogleCodeExporter commented 8 years ago
The Makefile is created by the configure script. It's contents depends on what 
you do
pass as options to configure. If you still know these options, you can restart 
the
configure script. Then type make uninstall (as root, you don't have rights to 
delete
some files as a normal user!).

rrip_gui is by the way normally hosted in /usr/local/bin or /usr/bin (when used
--prefix=/usr and is a rename of rubyripper_gtk2.rb. It's not logical that
rubyripper_gtk2.rb is installed.

Hope this helps... Next time simply do a make uninstall from the place you 
installed
it the last time. It will save you some trouble.

If you still can't figure it out, please show me the commands you use with 
./configure.

Original comment by rubyripp...@gmail.com on 7 Jan 2009 at 10:26

GoogleCodeExporter commented 8 years ago
By the way, you can and should probably delete the rr_lib.rb file you mentioned.

Original comment by rubyripp...@gmail.com on 7 Jan 2009 at 10:27

GoogleCodeExporter commented 8 years ago
I unpacked the archive of 0.5.0. Then I ran the configure command below, then 
sudo make install (ran fine) 
and sudo make uninstall (ran fine, warned about some obsolete messages.)

I then switched to the 0.5.4 directory and tried the same configure command - I 
got the same error as 
described above:

./rr_lib.rb:19: undefined method `+' for nil:NilClass (NoMethodError)
    from ./configure:37:in `require'
    from ./configure:37

Here is my configure command as you requested:

sudo ./configure --enable-lang-all --enable-gtk2 --
enable-cli --prefix=/usr

Thanks for helping!

Original comment by Jer....@gmail.com on 7 Jan 2009 at 10:59

GoogleCodeExporter commented 8 years ago
Your configure command seems fine.

So guess what? I did have a look at the code of line 19 of rr_lib.rb:
LOCALE=[ENV['PWD'] + "/locale", "/usr/local/share/locale"]

This concatenates two text strings. "/locale" is already a literal so apparently
ENV['PWD'] (parent working directory) is in your system not existing. This 
probably
means you don't have "irb" installed as well if I remember a similar bug 
report. This
is a bug in your distro. I never get the idea of stripping packages apart. But 
you
can probably circumvent the problem by installing ruby-dev, ruby-irb or some 
look-a-like.

Please report if this solves anything.

Original comment by rubyripp...@gmail.com on 11 Jan 2009 at 9:59

GoogleCodeExporter commented 8 years ago
ruby-dev and ruby-irb (1.9 versions) installed with no improvement.

FYI: I was able to install using the .deb at getdeb.net just fine.

?

Original comment by Jer....@gmail.com on 15 Jan 2009 at 1:11

GoogleCodeExporter commented 8 years ago
Please report what "irb" reports after feeding it with:

1) ENV["PWD"]
2) [ENV["PWD"] + "locale"]

Original comment by rubyripp...@gmail.com on 17 Jan 2009 at 6:05

GoogleCodeExporter commented 8 years ago
No response means issue closed.

Original comment by rubyripp...@gmail.com on 29 Jan 2009 at 3:54

GoogleCodeExporter commented 8 years ago
Not fixed, not at all - no response means I have no idea what irb is, how to 
feed it anything, and not much time 
to mess with this right now, sorry. If you do some searching around you will 
see that I wasn't the only one with 
this problem - just the only one who opened a bug, and I found the getdeb 
solution by finding others who had 
worked around the problem too.

So - 1. What is irb? (I did google it and I did not find anything helpful there)
2. How do I "feed" it those commands?

Original comment by Jer....@gmail.com on 29 Jan 2009 at 5:01

GoogleCodeExporter commented 8 years ago
others with same problem: example:

http://ubuntuforums.org/showthread.php?p=6226041

Original comment by Jer....@gmail.com on 29 Jan 2009 at 5:03

GoogleCodeExporter commented 8 years ago
That's ok with me, but I do need some feedback.

Irb stands for something like interactive ruby. You can launch it in a terminal 
with
the command irb. You can enter ruby code in it and it immediately evaluates the 
code.
It may be that you need to install is as a seperate package first. So feeding 
it is
figurely, you should enter the commands in irb, just like you would do in a 
regular
shell.

I've got an idea by the way: have you tried configure without the sudo part? You
don't need root rights for the configure script. You do need root rights in the 
next
step when entering make install.

Original comment by rubyripp...@gmail.com on 29 Jan 2009 at 9:57

GoogleCodeExporter commented 8 years ago
It was a good idea :) I can reproduce the error when using sudo. Then don't use 
sudo
for configure.

There is no single program I know of that needs root rights when executing a
configure script. Since the sudo environment doesn't have the current directory 
set
as a parameter, it gives back the bogus value nil. And you can't merge nil and 
a string.

I will move this problem into the FAQ section of the README file.

Original comment by rubyripp...@gmail.com on 29 Jan 2009 at 10:12

GoogleCodeExporter commented 8 years ago
OK, thanks for the help! And - sorry for the crabby tone - truly. I should have 
at least touched base sooner, and 
I appreciate your development efforts and the help with this issue. I am now 
wondering though: are there any 
issues I need to worry about now that I have another working install from the 
getdeb package? I don't want to 
hose that up and be left in the lurch. (And as you can tell I don't fully 
understand everything I'm doing.) I'm going 
to stand pat until next update and then I will try and use the config without 
root access fix.

THANK YOU!

Original comment by Jer....@gmail.com on 29 Jan 2009 at 10:17

GoogleCodeExporter commented 8 years ago
I've changed my mind about the solution of this.

You now get a proper error mesage:

bash-3.2# sudo ./configure --prefix=/usr
Don't run configure with sudo

Original comment by rubyripp...@gmail.com on 29 Jan 2009 at 10:22

GoogleCodeExporter commented 8 years ago
You can always uninstall the deb with your package management tool. This is 
distro
specific, so please ask there if you need help.

As you can see with last comment, you can't go wrong next time :)

Original comment by rubyripp...@gmail.com on 29 Jan 2009 at 10:25

GoogleCodeExporter commented 8 years ago
Well, there's foolproof and there's educated-foolproof ;) You have a case of an 
educated fool here - most 
dangerous kind! Thanks again - I will refer to this when updating next time.

Original comment by Jer....@gmail.com on 29 Jan 2009 at 10:35

GoogleCodeExporter commented 8 years ago
Note: I installed 0.5.5 from tarball as follows:

I put the tarball into /etc/rubyripper and extracted to a directory 
/etc/rubyripper/rubyripper-0.5.5

I ran ./configure with the flags above (but no sudo this time!) and ran into 
the following issues:

1st time through - I was denied permission to create the makefile. I used sudo 
chown to make myself the 
owner of the rubyripper-0.5.5 directory and ran again

2nd time through:  - I was able to get past the error above, but a new one 
happened: I was denied permission 
to do anything to rr_lib.rb. I saw that all the files in my directory were 
owned by root. I used sudo chown to 
make myself the owner of all the files in the directory and ran my ./configure 
command again

3rd time through - success! I was able to make a makefile and then used sudo 
make install to install 
rubyripper. The command "rrip_gui" starts the newest version of rubyripper, as 
noted in the log file. ;)

My question: in order to expand the tarball in that directory, I have to be 
root. Then the expanded archive has 
ownership by root. (Thinking back, this is probably why I ran the configure 
command with sudo in the first 
place.) Is there something I should be doing differently? Perhaps I should use 
sudo chown to make the parent 
/etc/rubyripper directory owned by me so that I can open the tarball without 
being root?

As you have seen, I am a newbie at all of this so go easy on me. As always, 
thanks for the help and the 
excellent software!

Original comment by Jer....@gmail.com on 5 Feb 2009 at 8:45

GoogleCodeExporter commented 8 years ago
The problem is that /etc is not normally writable by a user.

Steps should be:
1) download the archive as a user
2) extract the archive to somewhere in your home dir. For example use
/home/<username>/downloads/programs/rubyripper-0.5.5.
3) run configure
4) become root and make install (this can be done with sudo make install)

I hope this answers your question.

Original comment by rubyripp...@gmail.com on 5 Feb 2009 at 10:31

GoogleCodeExporter commented 8 years ago
It does - very helpful, thank you.

I have never been clear on where exactly to put software "odds and ends" that I 
download and compile myself. 
The benefit of the package managers is that they hide this info and prevent you 
from worrying about it, the 
drawback is the same thing - hiding what happens makes it harder to learn what 
"best practice" is.

THANK YOU! Also - I am sorry I have turned this issue # into a private tutorial 
forum, you are being really patient 
with me!

Original comment by Jer....@gmail.com on 5 Feb 2009 at 11:38