padrino start => stack level too deep (SystemStackError) with mysql gem #1092

Closed
bbonamin opened this Issue Mar 5, 2013 · 4 comments

Comments

Projects
None yet
3 participants
@bbonamin

bbonamin commented Mar 5, 2013

Hey guys,

It's me again. I'm trying to generate a new Padrino project with a specific component configuration and I'm getting this error when starting the padrino server.

My stack:

  • ruby 1.9.3
  • rbenv
  • padrino 0.10.7

I generate a new project with this command:

padrino g project stack_too_deep -d activerecord -t rspec -a mysql -s jquery -e haml -c sass -b

And when I cd into the project directory and run the padrino start command, I get this error:

0.10.7/lib/padrino-core/loader.rb:172: stack level too deep (SystemStackError)```
@bbonamin

This comment has been minimized.

Show comment Hide comment
@bbonamin

bbonamin Mar 5, 2013

Workaround:

Specify mysql2 instead of mysql as database adapter.

The following generation command allows you to start the server:

padrino g project stack_too_deep -d activerecord -t rspec -a mysql2 -s jquery -e haml -c sass -b

I don't know whether this should be considered as a bug or not, but the documentation on http://www.padrinorb.com/guides/generators specifies using mysql as a valid option. This gem causes the issue as stated in the previous description, but switching to the mysql2 gem appears to work around this issue.

bbonamin commented Mar 5, 2013

Workaround:

Specify mysql2 instead of mysql as database adapter.

The following generation command allows you to start the server:

padrino g project stack_too_deep -d activerecord -t rspec -a mysql2 -s jquery -e haml -c sass -b

I don't know whether this should be considered as a bug or not, but the documentation on http://www.padrinorb.com/guides/generators specifies using mysql as a valid option. This gem causes the issue as stated in the previous description, but switching to the mysql2 gem appears to work around this issue.

@dariocravero

This comment has been minimized.

Show comment Hide comment
@dariocravero

dariocravero Mar 6, 2013

Contributor

On the stack level too deep message, we've fixed that on edge, see #763, so the next time hopefully the error you will get will be more explicit :).

Coming back to the real issue, i.e., the mysql gem not working, in short: it should. Mysql2 is an alternative adapter and perhaps we should default to it since mysql's gem support being deprecated. Thoughts @padrino/core-members?

The mysql gem was pretty much dead from 2009 until November 2012, I guess they're doing bug fixes now mainly. We were locking users to version "~> 2.8" (see #989) so with 2.9.x out it will install that version instead. Generally, that wouldn't be an issue but it looks like there's something wrong with mysql 2.9 and activerecord.

The quickest solution to this would be to tie mysql to ~> 2.8.1 for whomever wants to use it - I'll send a PR for it. We should then rethink whether we default to mysql2 or not and allow using mysql with something like mysql-gem in the generator? @padrino/core-members?

Contributor

dariocravero commented Mar 6, 2013

On the stack level too deep message, we've fixed that on edge, see #763, so the next time hopefully the error you will get will be more explicit :).

Coming back to the real issue, i.e., the mysql gem not working, in short: it should. Mysql2 is an alternative adapter and perhaps we should default to it since mysql's gem support being deprecated. Thoughts @padrino/core-members?

The mysql gem was pretty much dead from 2009 until November 2012, I guess they're doing bug fixes now mainly. We were locking users to version "~> 2.8" (see #989) so with 2.9.x out it will install that version instead. Generally, that wouldn't be an issue but it looks like there's something wrong with mysql 2.9 and activerecord.

The quickest solution to this would be to tie mysql to ~> 2.8.1 for whomever wants to use it - I'll send a PR for it. We should then rethink whether we default to mysql2 or not and allow using mysql with something like mysql-gem in the generator? @padrino/core-members?

@ujifgc

This comment has been minimized.

Show comment Hide comment
@ujifgc

ujifgc Mar 6, 2013

Owner

I see no reason to stick with mysql gem in brand new generated apps. It's said that mysql2 is modern, fast and actively developed gem. We should drop mysql.

Owner

ujifgc commented Mar 6, 2013

I see no reason to stick with mysql gem in brand new generated apps. It's said that mysql2 is modern, fast and actively developed gem. We should drop mysql.

@bbonamin

This comment has been minimized.

Show comment Hide comment
@bbonamin

bbonamin Mar 6, 2013

Additionally the mysql gem has had compatibility issues with other platforms, including Windows. We had to migrate to mysql2 in a project because of this.

bbonamin commented Mar 6, 2013

Additionally the mysql gem has had compatibility issues with other platforms, including Windows. We had to migrate to mysql2 in a project because of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment