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

Add Rails 6 support. #80

Merged
merged 2 commits into from
Sep 26, 2019
Merged

Add Rails 6 support. #80

merged 2 commits into from
Sep 26, 2019

Conversation

joebutler2
Copy link
Contributor

This is to support the work in refinerycms-core, see this pull request for the details.

As of right now, if you download that branch and try using it in a fresh Rails 6 application, you'll see the following bundler error:

Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    rails (~> 6.0) was resolved to 6.0.0, which depends on
      railties (= 6.0.0)

    refinerycms was resolved to 4.0.2, which depends on
      refinerycms-core (= 4.0.2) was resolved to 4.0.2, which depends on
        refinerycms-i18n (>= 5.0.0, ~> 5.0) was resolved to 5.0.0, which depends on
          rails-i18n (~> 5.0) was resolved to 5.0.4, which depends on
            railties (~> 5.0)

Take note of the last 3 lines. Hopefully, with this commit we can start using RefineryCMS on Rails 6 once that other PR is finished & merged in!


Sidenote: looking at the third to last line refinerycms-i18n (>= 5.0.0, ~> 5.0). Won't the second rule overtake the first one? Since that's in the refinery core gem spec, I'm not sure. I know the bundler rules better than the gemspec rules (not sure if they match exactly either).

@joebutler2
Copy link
Contributor Author

So we can ignore the majority of the job failures in the build since refinerycms requires ruby version 2.4.5 or greater.

Stacktrace:

refinerycms-core-4.0.2 requires ruby version >= 2.4.5, which is incompatible
2.4.1 with the current version, ruby 2.4.4p296

Right now travis is configured to use the following non-supported rubies 2.4.4, 2.3.7, 2.2.10.

@joebutler2
Copy link
Contributor Author

joebutler2 commented Sep 25, 2019

The other failures are from being unable to connect to a database.

     Failure/Error: return PG::Connection.new( *args )
448     
449     PG::ConnectionBad:
450       could not connect to server: No such file or directory
451       	Is the server running locally and accepting
452       	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

and

     Failure/Error: connect user, pass, host, port, database, socket, flags
435     
436     Mysql2::Error:
437       Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

So the build is failing due to configuration issues.

 - Remove non-supported ruby versions from TravisCI.
 - Loosen gem restrictions on mobility so we can update to
   a version that supports Rails 6.
@joebutler2
Copy link
Contributor Author

I tested building this gem locally and it looks like it resolved the bundler conflicts we were having in the main refinerycms repository for Rails 6.

Once this is merged and built as a gem, RefineryCMS will be very close to supporting Rails 6!

- 2.3.7
- 2.2.10
sudo: false
- 2.6.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 2.6.1
- 2.6.4

- 2.2.10
sudo: false
- 2.6.1
- 2.5.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 2.5.3
- 2.5.6

sudo: false
- 2.6.1
- 2.5.3
- 2.4.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 2.4.5
- 2.4.7

@parndt
Copy link
Member

parndt commented Sep 25, 2019

Sidenote: looking at the third to last line refinerycms-i18n (>= 5.0.0, ~> 5.0). Won't the second rule overtake the first one? Since that's in the refinery core gem spec, I'm not sure. I know the bundler rules better than the gemspec rules (not sure if they match exactly either).

You're right, it's redundant. We might as well specify ~> 5.0. The dependency resolution for Bundler/gemspec should operate in the same way.

@joebutler2
Copy link
Contributor Author

@parndt any way we could merge this branch and release a patch version sooner than later? I can go back and make another PR to fix that redundancy.

Sent with GitHawk

@parndt parndt merged commit 73b0550 into refinery:master Sep 26, 2019
@joebutler2 joebutler2 deleted the rails-6-support branch September 26, 2019 14:42
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.

2 participants