Stack Level Too Deep Error (can't seem to figure it out)

On 17 December 2011 16:43, Vell [email protected] wrote:

I presume that you did copy gemfile.lock to the second machine and did
bundle install there.

I didn’t think I needed to copy the gemfile.lock to the mac os x
machine since they are both the same file. As for the vanilla app, I
only copied the gemfile not the gemfile.lock.

It is gemfile.lock that defines which gems and which versions to use
for the app. When you move an app you should move the lock file with
it and run bundle install. That will make sure the same gem versions
are used as were used previously. If you don’t do that then it may
end up using different versions of the gems.

Copy gemfile.lock from the working machine and run bundle install again.

For more info on this have a look at
http://gembundler.com/man/bundle-install.1.html
which has a good description of how it all works. Well reasonably
good, I have just posted a question here as there is (at least) one
aspect I realise that I do not understand :slight_smile:

Colin

To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


gplus.to/clanlaw

On Dec 17, 3:54pm, Craig W. [email protected] wrote:

sudo gem uninstall rubygems #remove anything higher than 1.4.2
sudo update_rubygems

and see if that helps

I did have a multiuser version of RVM installed on this system before
I imploded the system. But I recall the ruby gems version being the
same. Regardless itis certainly worth a shot to do that. Thank you for
the suggestion.

On Dec 17, 3:23pm, Colin L. [email protected] wrote:

will make sure all the right gems are available.

bit at a time until it fails.
As a side issue it would really have been better to clone the git repo
on the new machine rather than copying the whole lot. I wonder
whether you have something in tmp/cache or somewhere else that is
confusing it on the new system. If you end up copying everything over
to the vanilla app and it then works then it must be something like
that.

Yes, Git is going to be next part of this. Right now I dont have a git
server set up yet. I will continue to copy files over when I get back
home and see if it breaks. I thought comes to mind that I should
create a vanilla application on my mac and copy it over using the same
process and seeing if it breaks.

On Dec 17, 3:23pm, Colin L. [email protected] wrote:

will make sure all the right gems are available.

I presume you mean bundle install here.

Sorry Yes, I did mean bundle install

On Sat, 2011-12-17 at 15:55 -0800, Vell wrote:

Im using rvm so I shouldn’t have needed to use sudo. It looks like
there is a rubygems-update that has a version 1.4.2 but I don’t know
if that is exactly the same. When I do a gem list rubygems nothing
appears to be installed.

and see if that helps


sorry, you’re correct, sudo not needed w/ rvm and rubygems_update

gem install rubygems_update -v=“1.4.2”

remove the newer versions and then ‘rubygems_update’

Craig


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

On Dec 17, 3:54pm, Craig W. [email protected] wrote:

sudo gem uninstall rubygems #remove anything higher than 1.4.2
sudo update_rubygems

so it looks like v 1.4.2 isn’t a valid version? When I run gem install rubygems -v="1.4.2 or gem install rubygems --version=1.4.2
I get the following:
ERROR: Could not find a valid gem ‘rubygems’ (= 1.4.2) in any
repository

Im using rvm so I shouldn’t have needed to use sudo. It looks like
there is a rubygems-update that has a version 1.4.2 but I don’t know
if that is exactly the same. When I do a gem list rubygems nothing
appears to be installed.

On Dec 17, 7:03pm, Craig W. [email protected] wrote:

try something like

gem install rubygems_update -v=“1.4.2”

remove the newer versions and then ‘rubygems_update’

I am not seeing a way to uninstall version 1.8.10.

None of the following commands seem to work
gem uninstall rubygems
rubygems-update uninstall rubygems

Do you know the command I should use to get 1.8.10 off of my system so
that I can run rubygems-update to get back to that version? Sorry if
that seems obvious :-/

On Sat, 2011-12-17 at 16:27 -0800, Vell wrote:

used a mismatched rubygems version.
ERROR: Could not find a valid gem ‘rubygems’ (= 1.4.2) in any
sorry, you’re correct, sudo not needed w/ rvm and rubygems_update

Do you know the command I should use to get 1.8.10 off of my system so
that I can run rubygems-update to get back to that version? Sorry if
that seems obvious :-/


gem uninstall rubygems_update -v=“1.8.10”

Craig


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

On Sun, Dec 18, 2011 at 10:48 AM, Vell [email protected]
wrote:

Do you know the command I should use to get 1.8.10 off of my system so
that I can run rubygems-update to get back to that version? Sorry if
that seems obvious :-/

You can use: gem update --system [VERSION] to install whatever
version you like.

And FWIW you can find out a lot of interesting things with: gem --help

HTH,

Hassan S. ------------------------ [email protected]

twitter: @hassan

On Dec 18, 2:07pm, Hassan S. [email protected]
wrote:

On Sun, Dec 18, 2011 at 10:48 AM, Vell [email protected] wrote:

Do you know the command I should use to get 1.8.10 off of my system so
that I can run rubygems-update to get back to that version? Sorry if
that seems obvious :-/

You can use: gem update --system [VERSION] to install whatever
version you like.

I was looking to follow Craig’s instruction about uninstalling version
1.8.10 and that is where I am currently stuck. I don’t see where gem –
help explains how I can uninstall that particular version. Maybe there
is a bit of confusion on this.

So installing rubygems-update 1.4.2 is fine. This I have installed. If
I use the command you have provided it re-installs rubygems-update
1.4.2. This seems to be separate from what the current rubygems is
using.

If I do a gem list rubygems-update, I will see version 1.4.2. I do not
see version 1.8.10 in that list. If I do a gem list gems or gem list
rubygems it does not show any versions installed. Yet when I do gem -v
I see version 1.8.10. So my current issue is, how do I uninstall
version 1.8.10 so that I can try to use 1.4.2 to update back to
1.8.10? (if I understand that that is what I need to do)

On Dec 18, 2:07pm, Hassan S. [email protected]
wrote:

On Sun, Dec 18, 2011 at 10:48 AM, Vell [email protected] wrote:

Do you know the command I should use to get 1.8.10 off of my system so
that I can run rubygems-update to get back to that version? Sorry if
that seems obvious :-/

You can use: gem update --system [VERSION] to install whatever
version you like.

as a side note, doing gem update --system 1.4.2 tells me that I have
an undefined method `path’ for Gem::Module. It appears to have been
using rubygems-update 1.4.2 to do this system update.

On Sun, Dec 18, 2011 at 11:46 AM, Vell [email protected]
wrote:

If I do a gem list rubygems-update, I will see version 1.4.2. I do not
see version 1.8.10 in that list. If I do a gem list gems or gem list
rubygems it does not show any versions installed. Yet when I do gem -v
I see version 1.8.10. So my current issue is, how do I uninstall
version 1.8.10 so that I can try to use 1.4.2 to update back to
1.8.10? (if I understand that that is what I need to do)

OK, sorry, I’m baffled about what you’re trying to do here, so I’ll
leave
you to it.

That said, the UPGRADE.rdoc included with rubygems-update-1.8.10
seems pretty specific on downgrade instruction; have those just not
worked for you?


Hassan S. ------------------------ [email protected]

twitter: @hassan

On Dec 17, 8:11pm, Craig W. [email protected] wrote:

I vaguely recollect that I had this same error reported to me when I
I get the following:


rubygems-update uninstall rubygems

Do you know the command I should use to get 1.8.10 off of my system so
that I can run rubygems-update to get back to that version? Sorry if
that seems obvious :-/


gem uninstall rubygems_update -v=“1.8.10”

When I do a gem list rubygems-update, it only shows me that I have
1.4.2 installed on my system. Yet when I do a gem -v it tells me
1.8.10

rails30@fangorn:~/apps/new_site$ gem list rubygems-update

*** LOCAL GEMS ***

rubygems-update (1.4.2)


rails30@fangorn:~/apps/new_site$ gem -v
1.8.10

Doing a gem uninstall rubygems-update -v=1.8.10 tells me that it
doesn’t exist.

rails30@fangorn:~/apps/new_site$ gem uninstall rubygems-update -
v=‘1.8.10’
INFO: gem “rubygems-update” is not installed

Can it be going by another name? I tried using ‘gem’, ‘gems’, and
‘rubygems-update’. None seem to work.

On Fri, Dec 16, 2011 at 11:40 PM, Vell [email protected]
wrote:

line # raised:

Is this what you see when you click ‘Full Trace’?

On Dec 18, 3:54pm, Hassan S. [email protected]
wrote:

That said, the UPGRADE.rdoc included with rubygems-update-1.8.10
seems pretty specific on downgrade instruction; have those just not
worked for you?

It looks as though the rdoc is not on my system. When I run gem server
then connect to localhost:8808 I see the following:


rubygems 1.8.10 [rdoc] [www]
RubyGems itself
Executable is gem.

clicking on [rdoc] gives me the following error:

Not Found
`/doc_root/rubygems-1.8.10/rdoc/index.html’ not found.

I clicked on [www] looks like it takes me to the
http://docs.rubygems.org/
so I will have to look through it to see if it can tell me how.

On Sun, Dec 18, 2011 at 1:21 PM, Vell [email protected] wrote:

version 1.8.10 so that I can try to use 1.4.2 to update back to
It looks as though the rdoc is not on my system. When I run gem server
Not Found
`/doc_root/rubygems-1.8.10/rdoc/index.html’ not found.

I clicked on [www] looks like it takes me to the http://docs.rubygems.org/
so I will have to look through it to see if it can tell me how.

I think you are barking up the wrong tree with the rubygems issue. You
said
that your vanilla app runs fine on the Ubuntu server, right? I would
also
expect that if you had a gems version problem then you’d be seeing
errors
running bundle, rake, and other things before even running rails s.

On Dec 19, 11:22am, kernel panic [email protected] wrote:

Did you run bundle install after copying it? If not, try that. That
ran bundle
ran rails -s
connected to localhost:3000
app reports stack too deep error

Do you not have any databases? You didn’t mention that you ran rake
db:migrate.

Sorry, yes I did run bundle exec rake db:create and bundle exec rake
db:migrate as part of my install process.

On Sat, Dec 17, 2011 at 10:18 AM, Vell [email protected]
wrote:

copy from one system to the other.
corrected the permissions (used a vanilla app to see what the
permissions were)
ran bundle
ran rails -s
connected to localhost:3000
app reports stack too deep error

Do you not have any databases? You didn’t mention that you ran rake
db:migrate.

On Dec 19, 11:26am, kernel panic [email protected] wrote:

version 1.8.10 so that I can try to use 1.4.2 to update back to
then connect to localhost:8808 I see the following:
`/doc_root/rubygems-1.8.10/rdoc/index.html’ not found.

I clicked on [www] looks like it takes me to thehttp://docs.rubygems.org/
so I will have to look through it to see if it can tell me how.

I think you are barking up the wrong tree with the rubygems issue. You said
that your vanilla app runs fine on the Ubuntu server, right? I would also
expect that if you had a gems version problem then you’d be seeing errors
running bundle, rake, and other things before even running rails s.

I think you are right about that. I decided to move this app to rails
3.1 to see if this problem occurs and it does not. The application
comes up fine using the server environment that I have set up. I
simply generated a new 3.1 application and moved the contents of each
file into newly generated scaffold files. Once I did that the app
worked fine. I did not change any code or any routes.

So that baffles me further on why it broke when I was using rails
3.0.10. Regardless I am happy that it is working.

On Dec 19, 11:20am, kernel panic [email protected] wrote:

lion with rvm (ruby 1.9.2), rails 3.0.10.
Showing /home/rails30/apps/vell/app/views/homes/index.html.erb where
81

Is this what you see when you click ‘Full Trace’?

Yes that is what I saw during a full trace