Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 575: Migration to rails 3.1 #1180

Merged
merged 28 commits into from Oct 1, 2013

Conversation

danielstjules
Copy link
Contributor

A continuation of #1153
In reference to #575

Will be working on it this weekend.

ghigt and others added 12 commits August 13, 2013 18:01
Done :
 - edited Gemfile
 - moved from public/ to assets/
 - added `config.assets.enable = true` in config/application.rb
 - commented lines about rjs in config/environments/development.rb
 - added lines about uglifier and scss
 - added app/assets/stylesheets/application.css
 - added app/assets/application.js

TODO:
 - move application.js in javascripts
 - resolve images not found
 - remove files not needed like rails.js, jquery.js...
- moved application.js inside assets/javascripts
- removed jquery.js, prototype.js and rails.js to use the gems.
in
 - annotation_categories_controller_test.rb
 - assignments_controller_test.rb
added some fixtures files
for:
 - results_controller_test
 - rubrics_controller_test
@danielstjules
Copy link
Contributor Author

@benjaminvialle The reason we experienced so many errors was because we require a newer mysql2 gem. After the latest commit, I see:

688 tests, 1248 assertions, 2 failures, 0 errors
1026 tests, 3118 assertions, 5 failures, 17 errors

Much more manageable number to fix :)

@benjaminvialle
Copy link
Member

@danielstjules nice catch for mysql2 gem ;)

On my side, with postgresql, I've got:
688 tests, 1256 assertions, 0 failures, 0 errors, 0 skips
1026 tests, 3151 assertions, 4 failures, 11 errors, 0 skips

@danielstjules
Copy link
Contributor Author

Yeah, I'll be working through this today. Will hopefully get them all fixed for postgres and mysql. Do we still support sqlite?

@benjaminvialle
Copy link
Member

At the moment, we don't support sqlite as Markus is doing concurrent acces to the DB and sqlite don't support them. But I think concurrent access are not required in MarkUs. We should remove them and then test again with sqlite.

@danielstjules
Copy link
Contributor Author

A good chunk of the errors seem to be from the following change in Rails 3.1:

URL parameters which return nil for to_param are now removed from the query string.

Easy enough. I'll see what I can get through this week.

@danielstjules
Copy link
Contributor Author

Finally getting around to working on this again. With mysql, all unit tests pass, but still have 3 failures among functional tests. I'll fix those tomorrow. Then next up will be fixing the assets, and the issue with sessions.

@benjaminvialle
Copy link
Member

Hi @danielstjules it's good to see your working on this PR. Do you still have sessions issues? Because @ghigt and I corrected this on master before releasing 1.0-alpha.

@danielstjules
Copy link
Contributor Author

Yes, still having issues - I'm looking into it this afternoon. The branch is up-to-date with those changes GhiGt pushed. Unfortunately, there's more to it than just the inclusion of prototype-snippet.js

@danielstjules
Copy link
Contributor Author

@benjaminvialle Would you mind running the tests with your setup?

688 tests, 1250 assertions, 0 failures, 0 errors
1026 tests, 3210 assertions, 0 failures, 0 errors

@benjaminvialle
Copy link
Member

With ruby-1.9.3-p194 (the error in functional tests is a old one) :
688 tests, 1256 assertions, 0 failures, 0 errors, 0 skips

  1. Failure:
    test: An authenticated request to api/users testing index function should ignore invalid filters. (Api::UsersControllerTest) [/home/benjamin/MarkUs/Markus/test/functional/api/users_controller_test.rb:135]:
    Expected exactly 3 elements matching "user", found 0.

1026 tests, 3227 assertions, 1 failures, 0 errors, 0 skips

With ruby-1.8.7-p358 (the error in functional tests is a old one) :
688 tests, 1250 assertions, 0 failures, 0 errors

  1. Failure:
    test: An authenticated request to api/users testing index function should ignore invalid filters. (Api::UsersControllerTest) [test/functional/api/users_controller_test.rb:135]:
    Expected exactly 3 elements matching "user", found 0.
    is not true.

1026 tests, 3207 assertions, 1 failures, 0 errors

Good work! \o/

@danielstjules
Copy link
Contributor Author

@benjaminvialle That's the same issue you reported when the updated api/users was first merged: #1014

Do you think you could make an issue for this and outline some different aspects of your environment?

As for this pull request, it should be ready to merge very shortly!

@danielstjules
Copy link
Contributor Author

@benjaminvialle I think it's ready :)

@benjaminvialle
Copy link
Member

Will test your PR as soon as possible :)

@benjaminvialle
Copy link
Member

@danielstjules I'm merging this PR. I tested it and I didn't find any bugs related to the migration to Rails 3.1. We need to update the documentation as Rails 3.1 requires a javascript vm to run. (ruby-execjs package on Debian GNU/Linux systems)

benjaminvialle added a commit that referenced this pull request Oct 1, 2013
@benjaminvialle benjaminvialle merged commit ff270fc into MarkUsProject:master Oct 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants