Ruby on Rails Saturday, August 31, 2019



On Saturday, August 31, 2019 at 5:47:11 PM UTC-4, Walter Lee Davis wrote:
Yes, all else being correctly configured, files in your public folder should be available -- as long as you have the exact file name. A file in the /public folder would be available at your.site/file.name (don't put the 'public' part in the browser path).

There is a setting in your production.rb file that governs whether you allow your Web server to host these files, or if they are to be served through Rails. I don't recall what the default is. If you have it configured to go through your Web server, then NGINX or Apache configuration will govern how these files will be hosted. If you don't have that enabled, then it should Just Work.

One last thing to check is the ownership and permissions of your public folder and its contents. The folder should be world executable, and the files within it should be world readable. At a minimum, 557 for the folder and 644 for the files.

Walter

> On Aug 31, 2019, at 5:29 PM, fugee ohu <fuge...@gmail.com> wrote:
>
> I tried DNS TXT record google-site-verification but GSC (google search console) says not found and says it did find an SRV record Yes the SRV records are there  but so what
> Then I tried with a different method, the URL Prefix method where they gave me an html file to download and then I placed in my site's public folder but then when I try to verify GSC says timed out and when I try to visit the link in my browser it returns 403 If I place an html file in my public directory shouldn't it be available to the world?
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c786e105-acf6-4f73-b4fa-f3c841d8c6c5%4find0googlegroups.com.


Seems an error on google's end that prevents them from verifying via dns txt record They gave me 'google-site-verification=<string>" so I put 'google-site-verification' for host and the <string> for value in a dns txt record  but google doesn't find it

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8b14f99c-c2c6-4518-85a3-2236fd9788b0%40googlegroups.com.

Ruby on Rails



On Saturday, August 31, 2019 at 5:47:11 PM UTC-4, Walter Lee Davis wrote:
Yes, all else being correctly configured, files in your public folder should be available -- as long as you have the exact file name. A file in the /public folder would be available at your.site/file.name (don't put the 'public' part in the browser path).

There is a setting in your production.rb file that governs whether you allow your Web server to host these files, or if they are to be served through Rails. I don't recall what the default is. If you have it configured to go through your Web server, then NGINX or Apache configuration will govern how these files will be hosted. If you don't have that enabled, then it should Just Work.

One last thing to check is the ownership and permissions of your public folder and its contents. The folder should be world executable, and the files within it should be world readable. At a minimum, 557 for the folder and 644 for the files.

Walter

> On Aug 31, 2019, at 5:29 PM, fugee ohu <fuge...@gmail.com> wrote:
>
> I tried DNS TXT record google-site-verification but GSC (google search console) says not found and says it did find an SRV record Yes the SRV records are there  but so what
> Then I tried with a different method, the URL Prefix method where they gave me an html file to download and then I placed in my site's public folder but then when I try to verify GSC says timed out and when I try to visit the link in my browser it returns 403 If I place an html file in my public directory shouldn't it be available to the world?
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c786e105-acf6-4f73-b4fa-f3c841d8c6c5%40googlegroups.com.


Sorry, it was permissions on the public folder that's all Thanks Walter 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8be77292-b440-4305-869b-fc477e28f5b5%40googlegroups.com.

Ruby on Rails

Yes, all else being correctly configured, files in your public folder should be available -- as long as you have the exact file name. A file in the /public folder would be available at your.site/file.name (don't put the 'public' part in the browser path).

There is a setting in your production.rb file that governs whether you allow your Web server to host these files, or if they are to be served through Rails. I don't recall what the default is. If you have it configured to go through your Web server, then NGINX or Apache configuration will govern how these files will be hosted. If you don't have that enabled, then it should Just Work.

One last thing to check is the ownership and permissions of your public folder and its contents. The folder should be world executable, and the files within it should be world readable. At a minimum, 557 for the folder and 644 for the files.

Walter

> On Aug 31, 2019, at 5:29 PM, fugee ohu <fugee279@gmail.com> wrote:
>
> I tried DNS TXT record google-site-verification but GSC (google search console) says not found and says it did find an SRV record Yes the SRV records are there but so what
> Then I tried with a different method, the URL Prefix method where they gave me an html file to download and then I placed in my site's public folder but then when I try to verify GSC says timed out and when I try to visit the link in my browser it returns 403 If I place an html file in my public directory shouldn't it be available to the world?
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c786e105-acf6-4f73-b4fa-f3c841d8c6c5%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/26EF611A-8D97-410A-B5A0-DE6E2DD69979%40wdstudio.com.

Ruby on Rails

I tried DNS TXT record google-site-verification but GSC (google search console) says not found and says it did find an SRV record Yes the SRV records are there  but so what 
Then I tried with a different method, the URL Prefix method where they gave me an html file to download and then I placed in my site's public folder but then when I try to verify GSC says timed out and when I try to visit the link in my browser it returns 403 If I place an html file in my public directory shouldn't it be available to the world?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c786e105-acf6-4f73-b4fa-f3c841d8c6c5%40googlegroups.com.

Ruby on Rails Thursday, August 29, 2019

On the first look I would like your layout more (as something I would expect or design myself). However, I don't know any background on why is this like it is.

Dne úterý 27. srpna 2019 13:24:02 UTC+2 Dominik Menke napsal(a):
Hello list,

I've noticed ActiveStorage::Service::DiskService does two levels of directory sharding for Blob pathnames:

$ tree storage/
storage/
+-- aa/
    +-- bb/
    |   +-- aabb00...
    +-- cc/
        +-- aacc11...

However, when it comes to variants, the sharding is circumvented:

$ tree storage/
storage/
+-- aa/
|   +-- bb/
|   |   +-- aabb00...
|   +-- cc/
|       +-- aacc11...
+-- va/
    +-- ri/
        +-- variants/
            +-- aabb00.../
            |   +-- <encoded variant file name>
            +-- aacc11.../
                +-- <encoded variant file name>


Should sharding exclude variant/ key prefixes? Maybe the directory layout can look like this:

$ tree storage/
storage/
+-- aa/
|   +-- bb/
|   |   +-- aabb00...
|   +-- cc/
|       +-- aacc11...
+-- variants/
    +-- aa/
        +-- bb/
        |   +-- aabb00.../
        |       +-- <encoded variant file name>
        +-- cc/
            +-- aacc11.../
                +-- <encoded variant file name>


This might not actually a problem at all, as the limiting factor on ext4 file systems is the inode index (which allow directories to contain ~10 million entries with 32 character long names (reference); the Base58 blob id is only 24 characters long). I guess with ZFS it's even less of a problem.

I was going to create an issue for this, but this might actually be expected/desired behaviour. I'm also not sure if this is a bug or feature request either. I know changing this will cause some headache. I'm primarily looking for other opinions.

Kind Regards,
Dominik

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/af649317-8e22-4833-b1da-51d9b2d33029%40googlegroups.com.

Ruby on Rails Wednesday, August 28, 2019

Given Rails issues like https://github.com/rails/rails/issues/36921 and projects like https://github.com/SchemaPlus/schema_plus_enums, it seems like there's a real desire to use Postgres custom types in Rails without having to resort to `structure.sql`. (`structure.sql` support has gotten a lot better, but it's still vulnerable to e.g. nonsense churn caused by folks running different DB versions locally.)

Other Postgres-specific features, such as foreign data wrappers, are near-unusable within Rails when you're committing your schema -- `schema.rb` ignores them, and `structure.sql` encodes information that should never be committed, like database passwords.

I don't think that Rails maintainers should be obligated to maintain `schema.rb` dumpers for a lot of different, esoteric database-specific features. But right now, if you want to extend `schema.rb`'s functionality, you need to monkeypatch Rails internals; it's fragile when upgrading.

I'd like there to be a stable, external-facing interface allowing folks to extend `schema.rb` dumpers with database-specific features, without monkeypatching. I'm happy to take on the work of implementing this, but I wanted to raise this as an issue first so that if the core team isn't interested in this as a feature no work is wasted.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1af67230-4dad-467f-95a5-f41b8e8da620%40googlegroups.com.

Ruby on Rails Tuesday, August 27, 2019

Hello list,

I've noticed ActiveStorage::Service::DiskService does two levels of directory sharding for Blob pathnames:

$ tree storage/
storage/
+-- aa/
    +-- bb/
    |   +-- aabb00...
    +-- cc/
        +-- aacc11...

However, when it comes to variants, the sharding is circumvented:

$ tree storage/
storage/
+-- aa/
|   +-- bb/
|   |   +-- aabb00...
|   +-- cc/
|       +-- aacc11...
+-- va/
    +-- ri/
        +-- variants/
            +-- aabb00.../
            |   +-- <encoded variant file name>
            +-- aacc11.../
                +-- <encoded variant file name>


Should sharding exclude variant/ key prefixes? Maybe the directory layout can look like this:

$ tree storage/
storage/
+-- aa/
|   +-- bb/
|   |   +-- aabb00...
|   +-- cc/
|       +-- aacc11...
+-- variants/
    +-- aa/
        +-- bb/
        |   +-- aabb00.../
        |       +-- <encoded variant file name>
        +-- cc/
            +-- aacc11.../
                +-- <encoded variant file name>


This might not actually a problem at all, as the limiting factor on ext4 file systems is the inode index (which allow directories to contain ~10 million entries with 32 character long names (reference); the Base58 blob id is only 24 characters long). I guess with ZFS it's even less of a problem.

I was going to create an issue for this, but this might actually be expected/desired behaviour. I'm also not sure if this is a bug or feature request either. I know changing this will cause some headache. I'm primarily looking for other opinions.

Kind Regards,
Dominik

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6624225b-b14e-4143-82d2-c75a94e56c6c%40googlegroups.com.

Ruby on Rails Monday, August 26, 2019

Can you show the generated response of the request? try using the escape_javascript on the second render too ("j render....", the "j" at the beginning).

El lun., 26 ago. 2019 a las 9:38, Nikola Okonesh (<nikolaokonesh@gmail.com>) escribió:

I use pagination ajax (kaminari and pagy gem), click more page not work. how it


  var colum = document.querySelector("#categories_index");
  var pagin = document.querySelector("#categories_index_paginate");

  colum.innerHTML += ("<%= j render(partial: 'article/posts/post', collection: @posts, cached: true) %>");
  pagin.innerHTML = ("<%= render(partial: 'next_link') %>");

SyntaxError: missing ) in parenthetical

I not use JQuery.


use only "@rails/ujs": "^6.0.0" webpacker.


Rails -v 6.0.0.
Ruby -v 2.6.1


Help! Thanks!!!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9aaa2adf-c841-4a00-a43c-92c8e4dce8f7%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcDBTAdi-H1rr3Lf9hCe7C4fifz46J_ec3OYAarVJME7GQ%40mail.gmail.com.

Ruby on Rails

I use pagination ajax (kaminari and pagy gem), click more page not work. how it


Снимок экрана_2019-08-25_23-54-07.png

  var colum = document.querySelector("#categories_index");
  var pagin = document.querySelector("#categories_index_paginate");

  colum.innerHTML += ("<%= j render(partial: 'article/posts/post', collection: @posts, cached: true) %>");
  pagin.innerHTML = ("<%= render(partial: 'next_link') %>");

SyntaxError: missing ) in parenthetical

I not use JQuery.


use only "@rails/ujs": "^6.0.0" webpacker.


Rails -v 6.0.0.
Ruby -v 2.6.1


Help! Thanks!!!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9aaa2adf-c841-4a00-a43c-92c8e4dce8f7%40googlegroups.com.

Ruby on Rails Sunday, August 25, 2019

I recently implemented the Logster Gem to get a view of my errors in Production...

It's working fine however no matter what the log level is in production.rb, it looks like it is only displaying Fatal Errors...

I did look at the logs however and they are showing down to INFO level which is what I have the log level set to...

Anyone have any experience with Logster in production?

Did some googling and I am not seeing anything...

If no one has used Logster then what other logger would you recommend for a production environment?


John

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fa9e95a6-c7ad-4500-8912-de979ed9ca2e%40googlegroups.com.

Ruby on Rails Friday, August 23, 2019

I was able to publish the create-react-app my-app   --> right below...


but I was wrapping my head around getting this portfolio up and running so I can add a few of my web projects online.  (of course, I'd edited it a bit, lol)




On Thursday, August 22, 2019 at 5:20:32 PM UTC-4, Brent Mulligan wrote:
Is it an issue with the Heroku build failing? You may need to insert the heroku/nodejs buildpack infront of your heroku/ruby buildpack if it did not happen automatically. You can check by running `heroku buildpacks`, it should list something like 1. heroku/nodejs, 2. heroku/ruby.



On Thursday, August 22, 2019 at 10:20:58 AM UTC-4, Joe Guerra wrote:
Thanks.

I found a portfolio app that runs on react.  Got it working locally, unfortunately can't figure out how to publish it to heroku.  (  I did follow a tutorial, most tutorials don't seem to work...)



On Tuesday, August 20, 2019 at 9:54:34 AM UTC-4, Douglas Lovell wrote:
Here is an open source project on GitHub that combines React with Rails:


It takes a monorepo approach, with the front-end JS code next to the back-end Rails. To integrate, it simply has the JS build (uses Parcel) output the transpiled, bundled javascript into the Rails assets/javascripts directory. It names the output without a fingerprint, because Rails asset pipeline will add one.

The idea was to keep it as simple as it can possibly be and have it work cleanly. It doesn't use the react-rails gem. It doesn't use separate repositories or servers. All of these gymnastics for scale are aspirational. Few projects ever reach the point of scale, especially when bogged-down in the gymnastics.

On Monday, August 19, 2019 at 3:48:03 PM UTC-3, Joe Guerra wrote:
I'm going to rebuild my rails app and maybe add react on the front end.    I forget which version of rails I'm using, but I guess it would be best to start over with the latest.

Does anyone know of boilerplate or template that would include starting an app with the react & rails?  (maybe some other useful gems as well)

Thanks,
Joe

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b0ccb786-5585-4dd3-8a8f-a7d76f30b093%40googlegroups.com.

Ruby on Rails Thursday, August 22, 2019

Is it an issue with the Heroku build failing? You may need to insert the heroku/nodejs buildpack infront of your heroku/ruby buildpack if it did not happen automatically. You can check by running `heroku buildpacks`, it should list something like 1. heroku/nodejs, 2. heroku/ruby.



On Thursday, August 22, 2019 at 10:20:58 AM UTC-4, Joe Guerra wrote:
Thanks.

I found a portfolio app that runs on react.  Got it working locally, unfortunately can't figure out how to publish it to heroku.  (  I did follow a tutorial, most tutorials don't seem to work...)



On Tuesday, August 20, 2019 at 9:54:34 AM UTC-4, Douglas Lovell wrote:
Here is an open source project on GitHub that combines React with Rails:


It takes a monorepo approach, with the front-end JS code next to the back-end Rails. To integrate, it simply has the JS build (uses Parcel) output the transpiled, bundled javascript into the Rails assets/javascripts directory. It names the output without a fingerprint, because Rails asset pipeline will add one.

The idea was to keep it as simple as it can possibly be and have it work cleanly. It doesn't use the react-rails gem. It doesn't use separate repositories or servers. All of these gymnastics for scale are aspirational. Few projects ever reach the point of scale, especially when bogged-down in the gymnastics.

On Monday, August 19, 2019 at 3:48:03 PM UTC-3, Joe Guerra wrote:
I'm going to rebuild my rails app and maybe add react on the front end.    I forget which version of rails I'm using, but I guess it would be best to start over with the latest.

Does anyone know of boilerplate or template that would include starting an app with the react & rails?  (maybe some other useful gems as well)

Thanks,
Joe

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/87e67ae5-ed62-443e-822f-d0208afdfa73%40googlegroups.com.

Ruby on Rails

Thanks.

I found a portfolio app that runs on react.  Got it working locally, unfortunately can't figure out how to publish it to heroku.  (  I did follow a tutorial, most tutorials don't seem to work...)



On Tuesday, August 20, 2019 at 9:54:34 AM UTC-4, Douglas Lovell wrote:
Here is an open source project on GitHub that combines React with Rails:


It takes a monorepo approach, with the front-end JS code next to the back-end Rails. To integrate, it simply has the JS build (uses Parcel) output the transpiled, bundled javascript into the Rails assets/javascripts directory. It names the output without a fingerprint, because Rails asset pipeline will add one.

The idea was to keep it as simple as it can possibly be and have it work cleanly. It doesn't use the react-rails gem. It doesn't use separate repositories or servers. All of these gymnastics for scale are aspirational. Few projects ever reach the point of scale, especially when bogged-down in the gymnastics.

On Monday, August 19, 2019 at 3:48:03 PM UTC-3, Joe Guerra wrote:
I'm going to rebuild my rails app and maybe add react on the front end.    I forget which version of rails I'm using, but I guess it would be best to start over with the latest.

Does anyone know of boilerplate or template that would include starting an app with the react & rails?  (maybe some other useful gems as well)

Thanks,
Joe

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/25316f42-6b48-4a57-b57c-27b4adbd9447%40googlegroups.com.

Ruby on Rails Tuesday, August 20, 2019

Very nice explanation! 👍😀

On Tue, 20 Aug 2019 at 15:28 'Jake Niemiec' via Ruby on Rails: Talk <rubyonrails-talk@googlegroups.com> wrote:
>I'm not sure about why the word "migration" is used, but maybe you get somewhere reading database's theory or history.

Schemas change, the data migrates to the new schema. 

Probably in reference to older databases for sites developed with the likes of Active Server Pages / Java Servelets / Dream Weaver / Java Beans where the actual site "data" had to be manually moved between databases.

Remember when sites would take a few days off and simply show "website under construction"?



On Tue, Aug 20, 2019 at 1:08 PM Ariel Juodziukynas <arieljuod@gmail.com> wrote:
The term not just for Rails, schema migration is a database concept https://en.wikipedia.org/wiki/Schema_migration

I'm not sure about why the word "migration" is used, but maybe you get somewhere reading database's theory or history.

El mar., 20 ago. 2019 a las 13:13, Younes Serraj (<younes.serraj@gmail.com>) escribió:
A client just asked me why we call them "database migrations" and not "database alterations". It made me curious, so I'm asking you guys: why?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/08b7a57f-e2db-4595-9121-fffd6e139c1d%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcBZSKw0d7U%2BkUqPfY1neqXePs%2BdzaKmoKNVa8aGafSu2A%40mail.gmail.com.


--
WarmlyYours
Jake Niemiec
P: (800) 875-5285F: (800) 408-1100
Tell us how we're doing and receive $25 off your next order
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CALn2xuCdHMC%2B2fkb223K7sXf_Ce4PvWYvnKeATFJ5beVJ_RmMA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAJSkKMe4ahhBXkj4L4KRN_rPjfGR3bR6ThfSsM5Yn1bQBBRuHw%40mail.gmail.com.

Ruby on Rails

>I'm not sure about why the word "migration" is used, but maybe you get somewhere reading database's theory or history.

Schemas change, the data migrates to the new schema. 

Probably in reference to older databases for sites developed with the likes of Active Server Pages / Java Servelets / Dream Weaver / Java Beans where the actual site "data" had to be manually moved between databases.

Remember when sites would take a few days off and simply show "website under construction"?



On Tue, Aug 20, 2019 at 1:08 PM Ariel Juodziukynas <arieljuod@gmail.com> wrote:
The term not just for Rails, schema migration is a database concept https://en.wikipedia.org/wiki/Schema_migration

I'm not sure about why the word "migration" is used, but maybe you get somewhere reading database's theory or history.

El mar., 20 ago. 2019 a las 13:13, Younes Serraj (<younes.serraj@gmail.com>) escribió:
A client just asked me why we call them "database migrations" and not "database alterations". It made me curious, so I'm asking you guys: why?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/08b7a57f-e2db-4595-9121-fffd6e139c1d%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcBZSKw0d7U%2BkUqPfY1neqXePs%2BdzaKmoKNVa8aGafSu2A%40mail.gmail.com.


--
WarmlyYours
Jake Niemiec
P: (800) 875-5285F: (800) 408-1100
Tell us how we're doing and receive $25 off your next order
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CALn2xuCdHMC%2B2fkb223K7sXf_Ce4PvWYvnKeATFJ5beVJ_RmMA%40mail.gmail.com.

Ruby on Rails

The term not just for Rails, schema migration is a database concept https://en.wikipedia.org/wiki/Schema_migration

I'm not sure about why the word "migration" is used, but maybe you get somewhere reading database's theory or history.

El mar., 20 ago. 2019 a las 13:13, Younes Serraj (<younes.serraj@gmail.com>) escribió:
A client just asked me why we call them "database migrations" and not "database alterations". It made me curious, so I'm asking you guys: why?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/08b7a57f-e2db-4595-9121-fffd6e139c1d%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcBZSKw0d7U%2BkUqPfY1neqXePs%2BdzaKmoKNVa8aGafSu2A%40mail.gmail.com.

Ruby on Rails

It's because Database Migration (aka Schema Migration) is versionned.

So, we migrate (increment, decrement, etc..) from a schema version to another one.

Feel free to visit this Wiki page for further information:

Hope that helps..

Mehdi



Younes Serraj <younes.serraj@gmail.com>于2019年8月20日 周二下午6:13写道:
A client just asked me why we call them "database migrations" and not "database alterations". It made me curious, so I'm asking you guys: why?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/08b7a57f-e2db-4595-9121-fffd6e139c1d%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CANejssV4AbpeXwXXRKAB3F4_VPL5jRZoh5JLKAy2ut5N2iWkNA%40mail.gmail.com.

Ruby on Rails

A client just asked me why we call them "database migrations" and not "database alterations". It made me curious, so I'm asking you guys: why?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/08b7a57f-e2db-4595-9121-fffd6e139c1d%40googlegroups.com.

Ruby on Rails

Here is an open source project on GitHub that combines React with Rails:

https://github.com/wbreeze/socelect

It takes a monorepo approach, with the front-end JS code next to the back-end Rails. To integrate, it simply has the JS build (uses Parcel) output the transpiled, bundled javascript into the Rails assets/javascripts directory. It names the output without a fingerprint, because Rails asset pipeline will add one.

The idea was to keep it as simple as it can possibly be and have it work cleanly. It doesn't use the react-rails gem. It doesn't use separate repositories or servers. All of these gymnastics for scale are aspirational. Few projects ever reach the point of scale, especially when bogged-down in the gymnastics.

On Monday, August 19, 2019 at 3:48:03 PM UTC-3, Joe Guerra wrote:
I'm going to rebuild my rails app and maybe add react on the front end.    I forget which version of rails I'm using, but I guess it would be best to start over with the latest.

Does anyone know of boilerplate or template that would include starting an app with the react & rails?  (maybe some other useful gems as well)

Thanks,
Joe

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d2be7762-7226-4608-a1f4-9e1c73b1ae6e%40googlegroups.com.

Ruby on Rails Monday, August 19, 2019




Another approach is simply to have two completely separate apps: A REACT JS app deployed on Express (google "Create React App on Express") and a separate Rails app, deployed separate to separate servers (/dynos). (It's two separate apps!)

It's not a matter of "Can Rails serve up a React app via the asset pipeline (5.1/5.2) or webpack (6+)?" -- of course it can -- the answer is yes— but should you? 

These days I build out two separate apps even (a React front-end and a Rails backend) even when starting from scratch and even knowing that webpack is default in Rails 6 and that Rails is perfectly capable of serving up the React front-end. 






On Aug 19, 2019, at 3:29 PM, Noel <noelirias@gmail.com> wrote:

    There are at least 4 different ways that I'm familiar with and tons of resources to help you execute the way that works best for you. Here's the ones I've learned from researching:

1. Approach 1 - CDN based inclusion in header

- You can include it just as a link on the html pages you want to include some React functionality. This is as simple as putting it in the header of the pages.

2. Approach 2 - React Front-end/Rails API backend (pre-existing app)

- Convert controllers into API folders with namespacing technique and create the front-end `client` as shown in Approach 3.

3. Approach 3 - React Front-end/Rails API backend

- This approach works by creating a rails api
rails new myapp --api

- Within the directory of the app run
create-react-app client

- Install foreman gem, create Procfile with the following:
RAILS: bundle exec rails s -p 3001
REACT
: cd client && npm start
 (caveat: If deployed on Heroku, you may need to change `REACT` to `web`.)

- Run servers by
foreman start

- You will need something like axios in node to make the front-end `client` talk to the rails backend but this works.

4. Approach 4 -React-rails gem install
- This approach, I cannot speak to because it seemed the most .... coupled. In the back of my mind, I tend to think this couples react to rails in a way I, at this level of my knowledge, would not be able to decouple if I were to revert to something else or use Vue or stick to normal html requests.

Forgive me giving my opinion on that last one, if someone has more insight on the gem approach, I'd be happy to hear it.



On Monday, August 19, 2019 at 2:14:36 PM UTC-5, Stephen Blackstone wrote:
You likely just want —webpack=react if using rails 5.1 or higher
Sent from my iPhone

On Aug 19, 2019, at 2:54 PM, Joe Guerra <JGu...@jginfosys.com> wrote:

I guess this is what I'm looking for?

https://github.com/reactjs/react-rails

On Monday, August 19, 2019 at 2:48:03 PM UTC-4, Joe Guerra wrote:
I'm going to rebuild my rails app and maybe add react on the front end.    I forget which version of rails I'm using, but I guess it would be best to start over with the latest.

Does anyone know of boilerplate or template that would include starting an app with the react & rails?  (maybe some other useful gems as well)

Thanks,
Joe

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e66ae529-9607-4952-9798-cc229591f9bd%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/774f99b0-1647-432f-855b-3d0079ab15ff%40googlegroups.com.

Ruby on Rails

    There are at least 4 different ways that I'm familiar with and tons of resources to help you execute the way that works best for you. Here's the ones I've learned from researching:

1. Approach 1 - CDN based inclusion in header

- You can include it just as a link on the html pages you want to include some React functionality. This is as simple as putting it in the header of the pages.

2. Approach 2 - React Front-end/Rails API backend (pre-existing app)

- Convert controllers into API folders with namespacing technique and create the front-end `client` as shown in Approach 3.

3. Approach 3 - React Front-end/Rails API backend

- This approach works by creating a rails api
rails new myapp --api

- Within the directory of the app run
create-react-app client

- Install foreman gem, create Procfile with the following:
RAILS: bundle exec rails s -p 3001
REACT
: cd client && npm start
 (caveat: If deployed on Heroku, you may need to change `REACT` to `web`.)

- Run servers by
foreman start

- You will need something like axios in node to make the front-end `client` talk to the rails backend but this works.

4. Approach 4 -React-rails gem install
- This approach, I cannot speak to because it seemed the most .... coupled. In the back of my mind, I tend to think this couples react to rails in a way I, at this level of my knowledge, would not be able to decouple if I were to revert to something else or use Vue or stick to normal html requests.

Forgive me giving my opinion on that last one, if someone has more insight on the gem approach, I'd be happy to hear it.



On Monday, August 19, 2019 at 2:14:36 PM UTC-5, Stephen Blackstone wrote:
You likely just want —webpack=react if using rails 5.1 or higher
Sent from my iPhone

On Aug 19, 2019, at 2:54 PM, Joe Guerra <JGu...@jginfosys.com> wrote:

I guess this is what I'm looking for?

https://github.com/reactjs/react-rails

On Monday, August 19, 2019 at 2:48:03 PM UTC-4, Joe Guerra wrote:
I'm going to rebuild my rails app and maybe add react on the front end.    I forget which version of rails I'm using, but I guess it would be best to start over with the latest.

Does anyone know of boilerplate or template that would include starting an app with the react & rails?  (maybe some other useful gems as well)

Thanks,
Joe

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e66ae529-9607-4952-9798-cc229591f9bd%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/774f99b0-1647-432f-855b-3d0079ab15ff%40googlegroups.com.