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

Ruby upgrade to 2.4.4 #320

Merged
merged 27 commits into from
Feb 20, 2019
Merged

Ruby upgrade to 2.4.4 #320

merged 27 commits into from
Feb 20, 2019

Conversation

grvsachdeva
Copy link
Member

@grvsachdeva grvsachdeva commented Jan 30, 2019

Fixes #319

Make sure these boxes are checked before your pull request is ready to be reviewed and merged. Thanks!

  • tests pass -- rake test
  • code has been rebased on top of latest master (check if another pull request was added recently, and please rebase)
  • pull request is descriptively named and, if possible, multiple commits squashed if they're smaller changes

Thanks!

@welcome
Copy link

welcome bot commented Jan 30, 2019

Thanks for opening this pull request! Dangerbot will test out your code and reply in a bit with some pointers and requests.
There may be some errors, but don't worry! We're here to help! 👍🎉😄

@grvsachdeva grvsachdeva changed the title Ruby upgrade to 2.6.1 Ruby upgrade to 2.4.4 Jan 30, 2019
@grvsachdeva
Copy link
Member Author

Hi @icarito @jywarren , can you please help in completing this upgrade? Also, I think we should upgrade to ruby 2.4.4 so contributors will not face any issue while switching from plots2 to mapknitter.

Thanks!

@jywarren
Copy link
Member

jywarren commented Feb 4, 2019

@jywarren
Copy link
Member

jywarren commented Feb 5, 2019

Hmm... /bin/sh: 1: npm: not found

@jywarren
Copy link
Member

jywarren commented Feb 5, 2019

Aha! Running :-)

Error: test_should_get_profile(UsersControllerTest): TypeError: ActiveSupport::Duration can't be coerced into Integer

Could do with the fixtures timestamp attributes. We should check how they're generated in plots2, say in the User model.

@jywarren
Copy link
Member

jywarren commented Feb 5, 2019

Maybe here...

created_at: <%= Time.now %>

@jywarren
Copy link
Member

jywarren commented Feb 5, 2019

Hmm, plots2 does the same:

  created_at: <%= Time.now %>

@jywarren
Copy link
Member

jywarren commented Feb 5, 2019

https://stackoverflow.com/questions/42083737/gem-load-error-is-activesupportduration-cant-be-coerced-into-integer -- ok, can we try running this locally and see what exact line this happens on?

@jywarren
Copy link
Member

jywarren commented Feb 5, 2019

I bet we're passing a time range, or maybe a gem is, and the newer versions of Ruby can't turn it into an integer somewhere... maybe a time conversion. It's possible we could resolve by updating one or our gems...

@jywarren
Copy link
Member

jywarren commented Feb 5, 2019

Maybe @Souravirus has an insight, too? He's done a lot of such upgrades :-)

@sashadev-sky
Copy link
Member

@jywarren @gauravano I was doing some research for another issue I am opening right now and I just stumbled on this on the MySQL site:

"Removal of MAXDB means that the TIMESTAMP data type for CREATE TABLE or ALTER TABLE is no longer treated as DATETIME."

I think this could be the cause? I will not be able to check until for sure later tonight but I hope its helpful!

When I run rake test this test fails as an ActiveRecord Error:

test_should_get_profile(UsersControllerTest): ActiveRecord::StatementInvalid: Mysql2::Error: Incorrect datetime value: '2019-02-07 12:10:44 UTC' for column 'remember_token_expires_at'

@jywarren
Copy link
Member

jywarren commented Feb 6, 2019 via email

@sashadev-sky
Copy link
Member

sashadev-sky commented Feb 6, 2019

there are a few small formatting issues. I updated them and will make pull request shortly 👍

It was fixtures you were right

@jywarren
Copy link
Member

jywarren commented Feb 6, 2019

@sashadev-sky once we merge #323, do you think this will work once rebased?

@sashadev-sky
Copy link
Member

@jywarren I updated my local repo to use ruby 2.4.4 and ran the tests and I am now getting those errors. So I guess that was not the fix. But since I have it locally setup already I will see if I can try to fix that as well, change my ruby v back to 2.1.1, make sure everything still works then push another commit onto my current PR?

@sashadev-sky
Copy link
Member

@jywarren the issue was because Rails 3.2 and Ruby 2.4 are not compatible and lies in the ActiveSupport library. This incompatibility was fixed in a later versions of Rails.

I don't know if there is interest in updating the Rails version as well, but in the meantime, I added two more files in config/initializers and there are no more errors. I just pushed them to my PR #323 and will make another commit with notes added to them shortly. @gauravano

@Souravirus
Copy link
Member

Hi @jywarren @gauravano and @sashadev-sky, I am ready to help in every possible way. Just ping me I will be available.
Thank you !!

@sashadev-sky
Copy link
Member

@gauravano @jywarren what is the status on this update? I was thinking to open a PR to update mySQL after it

@grvsachdeva
Copy link
Member Author

hey @sashadev-sky, I will trigger the build again. Let's see how it goes now.

@grvsachdeva
Copy link
Member Author

@jywarren @sashadev-sky try this branch locally and please review this PR. Thanks!

@sashadev-sky
Copy link
Member

@gauravano I will check this out today thank you :)

@sashadev-sky
Copy link
Member

@gauravano I ran your PR locally and this worked for me! 👍

Just one thing to maybe add, even though it is not specifically Ruby it doesn't seem like it needs its own PR:
mapknitter/config/initializers/new_rails_defaults.rb

this file says it could have been removed a while ago (with Rails 3). I commented it out and there was no difference in setup for me. Should we comment it out and change the file name to maybe old_rails_defaults.rb?

@sashadev-sky
Copy link
Member

@gauravano @jywarren @Souravirus I will be opening an issue to update mySQL next. I have gauravano's PR here to guide me but is there any specific documentation that I should be following?

@jywarren
Copy link
Member

This seems super, and if you want to merge after removing mapknitter/config/initializers/new_rails_defaults.rb i'd be fine with that!

@sashadev-sky
Copy link
Member

@jywarren what is the process for merging? Do you just click "Squash and merge" in this case and your good to go?

@jywarren
Copy link
Member

jywarren commented Feb 20, 2019 via email

@welcome
Copy link

welcome bot commented Feb 20, 2019

Congrats on merging your first pull request! 🙌🎉⚡️
Your code will likely be published to https://mapknitter.org in the next few days.
In the meantime, can you tell us your Twitter handle so we can thank you properly?
Now that you've completed this, you can help someone else take their first step!
See: Public Lab's coding community!

@jywarren
Copy link
Member

I went ahead and merged this but @sashadev-sky if you want to remove that file in a new PR, that'd be great!

@jywarren
Copy link
Member

Thanks both of you, this is great.

@sashadev-sky
Copy link
Member

sashadev-sky commented Feb 20, 2019 via email

jywarren added a commit to jywarren/mapknitter that referenced this pull request Apr 6, 2019
* Contribute Dockerfile for working within a container

* Initial change made.

* .travis.yml

schema example

docker compose

more adjustmentes

new docker-compose

* slight adjustment to docker-compose.yml

* path fix

* bower.json

* bower.json openlayers

* bower.json openlayers tweak 2

* added rake

* Gemfile version tweak

* updated gemfile and Gemfile.lock

* bundle exec

* testing map map for only non-anonymous

* echoing gem list to debug

* rvm

* additional travis.yml tweaks

* Update .travis.yml

* Allow bundler to use system gems.

* Added mysql2 adapter dependency, tweaked database.yml and travis.yml

* Added mysql2 adapter, longer wait for db

* Update _list.html.erb

* Update _list.html.erb

* Update maps_controller.rb

* Update feeds_controller.rb

* Update Gemfile

* Update Gemfile

* Update .travis.yml

* Update database.yml.example

* recaptcha tweaks

* Update _list.html.erb

* Update routes.rb

* Update maps_controller.rb

* Update clean.builder

* Update clean.builder

* leaflet v1.0

* dockerfile fix

* updating to Leaflet 1.0, GoogleMutant tile layer, other tweaks

* js tweaks

* update gemfile recaptcha version

* Gemfile.lock

* unrelated tweaks

* Update Readme.md

Just a space for identifying syntax

* recaptcha fixes

* fixes

* Upgrade dependencies.

* updated paperclip

* issue publiclab#253 flag as spam

* integrate image-sequencer

* Update knitter2.html.erb

* Update bower.json

* Update show.html.erb

* Update show.html.erb

* Update show.html.erb

* Update bower.json

* modded button and prompt

* Update _list.html.erb

* API request handled for region-action

* more efficient spam redirect URL

* Update Map.js

* Update _login_form.html.erb

* Add files via upload

* Update README.md

* bower updated

* Map added

* Update index.html.erb

* Update _list.html.erb

* Update index.html.erb

* Update index.html.erb

* Changed width to full width .

* Added all layers from leaflet-environmental-layers

* Update bower.json

* Default Mapknitter Markers added

* Version updated for LEL .

* Full screen support added

* Update bower.json

* Create first timers issue template.md

* Create config.yml

* spam links in moderation feeds

* Add mapknitter to the help wanted link

Co-Authored-By: faithngetich <[email protected]>

* Replace the community link with the code.public link

Co-Authored-By: faithngetich <[email protected]>

* Update the first time only link to code.public

Co-Authored-By: faithngetich <[email protected]>

* Use the correct link to indicate where the code will be published

Co-Authored-By: faithngetich <[email protected]>

* Update index.html.erb

* Update bower.json

* Update bower.json

* Update bower.json

* Peg GoogleMutant layer to v0.7.0

see https://gitlab.com/IvanSanchez/Leaflet.GridLayer.GoogleMutant/issues/90 for the issue we encountered with `v0.7.1`

* [Security] Bump nokogiri from 1.8.1 to 1.9.1

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.8.1 to 1.9.1. **This update includes security fixes.**
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](sparklemotion/nokogiri@v1.8.1...v1.9.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump will_paginate from 3.0.7 to 3.1.6

Bumps [will_paginate](https://github.com/mislav/will_paginate) from 3.0.7 to 3.1.6.
- [Release notes](https://github.com/mislav/will_paginate/releases)
- [Commits](mislav/will_paginate@v3.0.7...v3.1.6)

Signed-off-by: dependabot[bot] <[email protected]>

* Cleanup (publiclab#313)

* initial cleanup

* export unit tests, basic

* map tests

* basic comment tests

* cleanup

* export functional tests

* fixes

* Update export.rb

* test fixes and further cleanup

* extra test

* trying again

* another unit test

* output errors?

* Update map_test.rb

* Update maps.yml

* Update tag_test.rb

* Bump rake from 10.5.0 to 12.3.2 (publiclab#286)

Bumps [rake](https://github.com/ruby/rake) from 10.5.0 to 12.3.2.
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](ruby/rake@v10.5.0...v12.3.2)

Signed-off-by: dependabot[bot] <[email protected]>

* [Security] Bump i18n from 0.7.0 to 0.9.5 (publiclab#289)

Bumps [i18n](https://github.com/svenfuchs/i18n) from 0.7.0 to 0.9.5. **This update includes security fixes.**
- [Release notes](https://github.com/svenfuchs/i18n/releases)
- [Changelog](https://github.com/ruby-i18n/i18n/blob/master/CHANGELOG.md)
- [Commits](ruby-i18n/i18n@v0.7.0...v0.9.5)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump rdiscount from 2.1.7.1 to 2.2.0.1 (publiclab#321)

Bumps [rdiscount](https://github.com/davidfstr/rdiscount) from 2.1.7.1 to 2.2.0.1.
- [Release notes](https://github.com/davidfstr/rdiscount/releases)
- [Changelog](https://github.com/davidfstr/rdiscount/blob/master/CHANGELOG.md)
- [Commits](davidfstr/rdiscount@2.1.7.1...2.2.0.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Unit test warpable code (publiclab#331)

* tests for warpables, test to distort in ImageMagick

* file existence test

* make test folder

* demo file and copying

* delete demo image

* mkdir -p

* save_dimensions

* Bump recaptcha from 4.6.3 to 4.9.0 (publiclab#332)

Bumps [recaptcha](https://github.com/ambethia/recaptcha) from 4.6.3 to 4.9.0.
- [Release notes](https://github.com/ambethia/recaptcha/releases)
- [Changelog](https://github.com/ambethia/recaptcha/blob/master/CHANGELOG.md)
- [Commits](ambethia/recaptcha@v4.6.3...v4.9.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Show only maps with at least one image in main listing

* Update Leaflet.DistortableImage version

* basic map unit tests (publiclab#334)

* basic map unit tests

* try to run entire map.run_export

* parameter consolidation

* Updates to customize rails / ruby and mySQL version compatibility  (publiclab#323)

* update time fixtures and override sql primary default keys

* Reset HEAD to first commit and reapply changes

* Finalize comments for customizations

* Changed a word

* update readme.md (publiclab#335)

solve the beginner issue of database

* Ruby upgrade to 2.4.4 (publiclab#320)

* ruby version update

* change in dockerfile

* version change to 2.4.4

* dockerfile fix

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* [Security] Bump i18n from 0.7.0 to 0.9.5 (publiclab#289)

Bumps [i18n](https://github.com/svenfuchs/i18n) from 0.7.0 to 0.9.5. **This update includes security fixes.**
- [Release notes](https://github.com/svenfuchs/i18n/releases)
- [Changelog](https://github.com/ruby-i18n/i18n/blob/master/CHANGELOG.md)
- [Commits](ruby-i18n/i18n@v0.7.0...v0.9.5)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump rdiscount from 2.1.7.1 to 2.2.0.1 (publiclab#321)

Bumps [rdiscount](https://github.com/davidfstr/rdiscount) from 2.1.7.1 to 2.2.0.1.
- [Release notes](https://github.com/davidfstr/rdiscount/releases)
- [Changelog](https://github.com/davidfstr/rdiscount/blob/master/CHANGELOG.md)
- [Commits](davidfstr/rdiscount@2.1.7.1...2.2.0.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Unit test warpable code (publiclab#331)

* tests for warpables, test to distort in ImageMagick

* file existence test

* make test folder

* demo file and copying

* delete demo image

* mkdir -p

* save_dimensions

* Bump recaptcha from 4.6.3 to 4.9.0 (publiclab#332)

Bumps [recaptcha](https://github.com/ambethia/recaptcha) from 4.6.3 to 4.9.0.
- [Release notes](https://github.com/ambethia/recaptcha/releases)
- [Changelog](https://github.com/ambethia/recaptcha/blob/master/CHANGELOG.md)
- [Commits](ambethia/recaptcha@v4.6.3...v4.9.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Show only maps with at least one image in main listing

* Update Leaflet.DistortableImage version

* basic map unit tests (publiclab#334)

* basic map unit tests

* try to run entire map.run_export

* parameter consolidation

* Updates to customize rails / ruby and mySQL version compatibility  (publiclab#323)

* update time fixtures and override sql primary default keys

* Reset HEAD to first commit and reapply changes

* Finalize comments for customizations

* Changed a word

* update readme.md (publiclab#335)

solve the beginner issue of database

* ruby version update

* change in dockerfile

* version change to 2.4.4

* dockerfile fix

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* gemfile.lock update

* gemfile.lock update

* Fix map of maps (publiclab#354)

* add image urls to maps json (publiclab#352)

* add image urls to maps json

* Add tests for image urls

* Shortening docker image in ~30%

* Caching bundle, gathering env variables and using newer sintax

* Creating startup script and env file

* Improving travis CI configuration

* Switch to Yarn from Bower

Ref: publiclab#357

Co-authored-by: kaunair <[email protected]>

* Loading assets in production env

* Allow uglifier to interpret ES6, removing yarn-error.log

* updating to rails4.2.8
chen-robert pushed a commit to chen-robert/mapknitter that referenced this pull request Dec 5, 2019
* ruby version update

* change in dockerfile

* version change to 2.4.4

* dockerfile fix

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* [Security] Bump i18n from 0.7.0 to 0.9.5 (publiclab#289)

Bumps [i18n](https://github.com/svenfuchs/i18n) from 0.7.0 to 0.9.5. **This update includes security fixes.**
- [Release notes](https://github.com/svenfuchs/i18n/releases)
- [Changelog](https://github.com/ruby-i18n/i18n/blob/master/CHANGELOG.md)
- [Commits](ruby-i18n/i18n@v0.7.0...v0.9.5)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump rdiscount from 2.1.7.1 to 2.2.0.1 (publiclab#321)

Bumps [rdiscount](https://github.com/davidfstr/rdiscount) from 2.1.7.1 to 2.2.0.1.
- [Release notes](https://github.com/davidfstr/rdiscount/releases)
- [Changelog](https://github.com/davidfstr/rdiscount/blob/master/CHANGELOG.md)
- [Commits](davidfstr/rdiscount@2.1.7.1...2.2.0.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Unit test warpable code (publiclab#331)

* tests for warpables, test to distort in ImageMagick

* file existence test

* make test folder

* demo file and copying

* delete demo image

* mkdir -p

* save_dimensions

* Bump recaptcha from 4.6.3 to 4.9.0 (publiclab#332)

Bumps [recaptcha](https://github.com/ambethia/recaptcha) from 4.6.3 to 4.9.0.
- [Release notes](https://github.com/ambethia/recaptcha/releases)
- [Changelog](https://github.com/ambethia/recaptcha/blob/master/CHANGELOG.md)
- [Commits](ambethia/recaptcha@v4.6.3...v4.9.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Show only maps with at least one image in main listing

* Update Leaflet.DistortableImage version

* basic map unit tests (publiclab#334)

* basic map unit tests

* try to run entire map.run_export

* parameter consolidation

* Updates to customize rails / ruby and mySQL version compatibility  (publiclab#323)

* update time fixtures and override sql primary default keys

* Reset HEAD to first commit and reapply changes

* Finalize comments for customizations

* Changed a word

* update readme.md (publiclab#335)

solve the beginner issue of database

* ruby version update

* change in dockerfile

* version change to 2.4.4

* dockerfile fix

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* gemfile.lock update

* gemfile.lock update
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.

5 participants