Re: [Rails] how do i know what ruby version my site was built with

2020-01-05 Thread Colin Law
On Sat, 4 Jan 2020 at 22:15, fugee ohu wrote: > > If I didn't specify a ruby version in my Gemfile Look in the file that specifies which version of each gem to use. Colin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To

Re: [Rails] error using direct path url vs ok when navigating by mouse

2019-10-18 Thread Colin Law
On Fri, 18 Oct 2019 at 19:33, fugee ohu wrote: > > > On Friday, October 18, 2019 at 5:57:55 AM UTC-4, Colin Law wrote: >> >> On Fri, 18 Oct 2019 at 09:26, fugee ohu wrote: >> >>> On one of my sites (in production) if I navigate to >>> https:

Re: [Rails] error using direct path url vs ok when navigating by mouse

2019-10-18 Thread Colin Law
On Fri, 18 Oct 2019 at 09:26, fugee ohu wrote: > On one of my sites (in production) if I navigate to > https:///set_locale/ko > the browser doesn't load the page but if I'm on the site and I click the > link for that url it works fine I was notified about the error by GSC > You haven't told us

Re: [Rails] Carrierwave metadata for original creation date?

2019-09-20 Thread Colin Law
On Fri, 20 Sep 2019 at 18:10, fugee ohu wrote: > > How do I keep a record of the original creation date? What if I wanna > preserve the original creation date? Each record in the database has a created_at field. At least mine do. Colin -- You received this message because you are subscribed

Re: [Rails] Rails and Machine Learning implementation of Python or Ruby

2019-08-17 Thread Colin Law
On Sat, 17 Aug 2019 at 14:40, Walter Lee Davis wrote: > > If you shell out to Python, you will have access to anything that Python has > access to. I haven't used it in many years, so I don't know what that might > be, but it would be the same as running your Python application raw in the >

Re: [Rails] How should I go about upgrading Ubuntu Server that my Rails application is running on?

2019-07-18 Thread Colin Law
On Thu, 18 Jul 2019 at 19:15, David McDonald wrote: > > I have an ubuntu-server running version: Ubuntu 14.04.5 LTS. I want to > upgrade it to Ubuntu 18.04 LTS. I snapshotted my server and tried to upgrade > it to 16.04, and then 18.04 but ran into some issues where it seems through > the

Re: [Rails] Iban gem integration

2019-03-25 Thread Colin Law
On Mon, 25 Mar 2019 at 07:12, Sapna Mishra wrote: > > I have installed IBAN gem to my application. > > gem 'IBAN' > Did you run bundle install after that? Colin > > I have created one validator class for this. > > require 'IBAN' > class IbanValidator < ActiveModel::Validator > def

Re: [Rails] Rake aborted!

2019-03-10 Thread Colin Law
; On Sunday, March 10, 2019 at 4:04:21 PM UTC-4, Colin Law wrote: >> >> On Sun, 10 Mar 2019 at 17:35, wrote: >> > >> > Thank you Walter and Hasan. The gem is actually in the gem file but this >> > occurred in development on my desktop so my guess woul

Re: [Rails] Rake aborted!

2019-03-10 Thread Colin Law
On Sun, 10 Mar 2019 at 17:35, wrote: > > Thank you Walter and Hasan. The gem is actually in the gem file but this > occurred in development on my desktop so my guess would be I would need to > install it there. If therubyracer is in your Gemfile then that should be enough. Colin > > On

Re: [Rails] Is it possible to reference welcome#index, in the routes file?

2019-03-08 Thread Colin Law
On Fri, 8 Mar 2019 at 13:05, Robert Phillips wrote: > ... > I don't mean to sound patronizing Not sure you have succeeded in that. > ... > Also you were trying to tell me that the routes file has a root in there > explicitly by default. No I wasn't. I was asking. I have just tried it and

Re: [Rails] Is it possible to reference welcome#index, in the routes file?

2019-03-08 Thread Colin Law
On Fri, 8 Mar 2019 at 12:19, Robert Phillips wrote: > > > > On Friday, 8 March 2019 12:07:16 UTC, Colin Law wrote: >> >> >> You can reference any controller/action in the routes. Welcome#index >> is no different to any other. Reference it exactly the sa

Re: [Rails] Is it possible to reference welcome#index, in the routes file?

2019-03-08 Thread Colin Law
On Fri, 8 Mar 2019 at 11:46, Robert Phillips wrote: > > Is it possible to reference welcome#index, in the routes file? > > e.g. suppose you create a rails program, > so then you do ralsi server you get the welcome page come up. > but the routes file is blank. The welcome controller hasn't been

Re: [Rails] Problem serving image assets

2019-03-06 Thread Colin Law
gt; On Mar 6, 2019, at 10:16 AM, Colin Law wrote: > > > > On Wed, 6 Mar 2019 at 14:47, Walter Lee Davis wrote: > >> > >> > >>> On Mar 6, 2019, at 9:27 AM, Walter Lee Davis wrote: > >>> > >>> The asset pipeline needs a JavaScript

Re: [Rails] Problem serving image assets

2019-03-06 Thread Colin Law
On Wed, 6 Mar 2019 at 14:47, Walter Lee Davis wrote: > > > > On Mar 6, 2019, at 9:27 AM, Walter Lee Davis wrote: >> > > The asset pipeline needs a JavaScript interpreter to work correctly on the > > server. I usually install whatever version of Node.js is available in a > > package manager.

[Rails] Problem serving image assets

2019-03-06 Thread Colin Law
I hope someone can help me with an assets problem. I have had to rebuild a production server and images are no longer getting served. Unfortunately the working system is no more so I can't compare what I have with what used to work in order to help diagnose the problem. I am using Rails 4.2 with

Re: [Rails] Devise

2019-02-26 Thread Colin Law
On Tue, 26 Feb 2019 at 03:32, David Merrick wrote: > > I don't see any errors in the logs. No errors are displayed sorry Well what *do* you see in the logs when you click the link. Comparing it with the one that does work might give you a clue. Colin -- You received this message because you

Re: [Rails] Re: text visible in browser but not in source

2019-02-17 Thread Colin Law
On Sun, 17 Feb 2019 at 09:20, fugee ohu wrote: > > Just when I was getting somewhere with this the site's directing me to the > user login page Perhaps they don't want you to scrape their data. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on

Re: [Rails] text visible in browser but not in source

2019-02-07 Thread Colin Law
On Thu, 7 Feb 2019 at 11:25, fugee ohu wrote: > > > On Thursday, February 7, 2019 at 3:57:03 AM UTC-5, Colin Law wrote: >> >> On Thu, 7 Feb 2019 at 07:49, Colin Law wrote: >> >>> >>> >>> On Thu, 7 Feb 2019, 01:36 fugee ohu >> >&

Re: [Rails] text visible in browser but not in source

2019-02-07 Thread Colin Law
On Thu, 7 Feb 2019 at 07:49, Colin Law wrote: > > > On Thu, 7 Feb 2019, 01:36 fugee ohu >> >> >> On Wednesday, February 6, 2019 at 5:04:55 PM UTC-5, Colin Law wrote: >>> >>> On Wed, 6 Feb 2019 at 21:42, fugee ohu wrote: >>>

Re: [Rails] text visible in browser but not in source

2019-02-06 Thread Colin Law
On Thu, 7 Feb 2019, 01:36 fugee ohu > > On Wednesday, February 6, 2019 at 5:04:55 PM UTC-5, Colin Law wrote: >> >> On Wed, 6 Feb 2019 at 21:42, fugee ohu wrote: >> >>> ... >>> JSON::ParserError: 784: unexpected token at >>> 'skuProducts=[

Re: [Rails] text visible in browser but not in source

2019-02-06 Thread Colin Law
On Wed, 6 Feb 2019 at 21:42, fugee ohu wrote: > ... > JSON::ParserError: 784: unexpected token at > 'skuProducts=[{"skuAttr":"27763:201336100;491:24763#145cm","skuPropIds" > > I understand why people get annoyed with your posts. What is the point of posting a string that is obviously

Re: [Rails] text visible in browser but not in source

2019-01-30 Thread Colin Law
On Wed, 30 Jan 2019 at 22:12, Colin Law wrote: > > On Wed, 30 Jan 2019 at 22:09, fugee ohu wrote: > > > > > > > > On Wednesday, January 30, 2019 at 5:02:17 PM UTC-5, Colin Law wrote: > >> > >> On Wed, 30 Jan 2019 at 21:56, fugee ohu wrote: >

Re: [Rails] text visible in browser but not in source

2019-01-30 Thread Colin Law
On Wed, 30 Jan 2019 at 22:09, fugee ohu wrote: > > > > On Wednesday, January 30, 2019 at 5:02:17 PM UTC-5, Colin Law wrote: >> >> On Wed, 30 Jan 2019 at 21:56, fugee ohu wrote: >> > ... >> > Everything in the unparsed resonse body that I want is b

Re: [Rails] text visible in browser but not in source

2019-01-30 Thread Colin Law
On Wed, 30 Jan 2019 at 22:05, fugee ohu wrote: > > How do I chomp everything at the end of the string starting with ] You don't. What you have already is fine. Read my previous email. Colin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails:

Re: [Rails] text visible in browser but not in source

2019-01-30 Thread Colin Law
On Wed, 30 Jan 2019 at 21:56, fugee ohu wrote: > ... > Everything in the unparsed resonse body that I want is between [ and ] I have > to gsub it out No you don't. After you get parsed_obj["results] (which is an array, that's what the [] mean) then you can get the first product by

Re: [Rails] text visible in browser but not in source

2019-01-30 Thread Colin Law
On Wed, 30 Jan 2019 at 16:41, fugee ohu wrote: > > > > On Wednesday, January 30, 2019 at 9:45:03 AM UTC-5, Colin Law wrote: >> >> On Wed, 30 Jan 2019 at 13:48, fugee ohu wrote: >> > >> >> >> >> Show us what puts parsed_obj["results

Re: [Rails] text visible in browser but not in source

2019-01-30 Thread Colin Law
On Wed, 30 Jan 2019 at 13:48, fugee ohu wrote: > >> >> Show us what puts parsed_obj["results"] gives. If it is long then >> from the start up to where productID occurs. >> >> Colin > > > {"productId"=>32970292001, "sellerId"=>235696817, "oriMinPrice"=>"US > $50.00", "oriMaxPrice"=>"US $50.00",

Re: [Rails] text visible in browser but not in source

2019-01-30 Thread Colin Law
On Wed, 30 Jan 2019 at 11:19, fugee ohu wrote: > ... > puts parsed_obj["results"] shows the entire results but `puts > parsed_obj["results"]["productId"] gets me error no implicit conversion of > String into Integer Show us what puts parsed_obj["results"] gives. If it is long then from the

Re: [Rails] text visible in browser but not in source

2019-01-30 Thread Colin Law
On Wed, 30 Jan 2019 at 10:09, fugee ohu wrote: > > How would I get results->productId results["productId"] Colin -- 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

Re: [Rails] text visible in browser but not in source

2019-01-30 Thread Colin Law
On Wed, 30 Jan 2019 at 09:55, fugee ohu wrote: > ... > I can print the outer values of parsed_obj with an iteration loop > parsed_obj.each |key, val| do > can you tell me how do i select individual keys within the nested hash > 'results' Does that mean you have parsed it ok? Isn't it obvious?

Re: [Rails] text visible in browser but not in source

2019-01-29 Thread Colin Law
On Wed, 30 Jan 2019, 03:52 fugee ohu > > On Tuesday, January 29, 2019 at 4:21:43 AM UTC-5, Colin Law wrote: >> >> On Tue, 29 Jan 2019 at 03:20, fugee ohu wrote: >> > ... >> > Can you give me an idea how to extract it >> >> Are you seriously

Re: [Rails] text visible in browser but not in source

2019-01-29 Thread Colin Law
On Tue, 29 Jan 2019 at 03:20, fugee ohu wrote: > ... > Can you give me an idea how to extract it Are you seriously asking, after the years that you have been using Ruby, that you don't know how to extract a particular section from a string? Apart from anything else, since I haven't got access

Re: [Rails] AWS and hosting a Website

2019-01-27 Thread Colin Law
On Sat, 26 Jan 2019 at 20:56, David Merrick wrote: > > How do you ensure it runs all the time? By this do you possibly mean "How to auto-run the server on boot and restart it if it fails?". Colin > > On Sun, Jan 27, 2019 at 9:55 AM Hassan Schroeder > wrote: >> >> On Sat, Jan 26, 2019 at

Re: [Rails] Still getting ENOENT error `initialize': No such file or directory @ rb_sysopen

2019-01-22 Thread Colin Law
On Mon, 21 Jan 2019 at 21:27, dwilde1 wrote: > > Now, as you can see from the output of the ls -al command, the file is there, > and it's readable and writable. The db/migrate directory is also writable by > world, but none of the tests find it and it blows up on File.open. I'm > running the

Re: [Rails] choosing the right rubygem mysql2 and ruby version

2019-01-13 Thread Colin Law
On Sat, 12 Jan 2019 at 23:36, fugee ohu wrote: > > How do I know which mysql2 gem version I need to use? Do they follow releases > of rails and should I try to use the version that most closely matches my > rails version? Also, how do I know which ruby version to use? If this is an existing

Re: [Rails] text visible in browser but not in source

2018-12-31 Thread Colin Law
On Mon, 31 Dec 2018 at 12:12, fugee ohu wrote: > > > > On Sunday, December 30, 2018 at 10:56:30 AM UTC-5, Colin Law wrote: >> >> On Sun, 30 Dec 2018 at 15:45, fugee ohu wrote: >> > >> > >> > >> > On Sunday, December 30, 2018 at 8:36:4

Re: [Rails] text visible in browser but not in source

2018-12-31 Thread Colin Law
On Mon, 31 Dec 2018 at 05:26, fugee ohu wrote: > > > > On Sunday, December 30, 2018 at 10:56:30 AM UTC-5, Colin Law wrote: >> >> On Sun, 30 Dec 2018 at 15:45, fugee ohu wrote: >> > >> > >> > >> > On Sunday, December 30, 2018 at 8:36:4

Re: [Rails] text visible in browser but not in source

2018-12-30 Thread Colin Law
On Sun, 30 Dec 2018 at 15:45, fugee ohu wrote: > > > > On Sunday, December 30, 2018 at 8:36:40 AM UTC-5, Colin Law wrote: >> >> On Sun, 30 Dec 2018 at 12:06, fugee ohu wrote: >> > ... >> > It's not json it's javascript so I don't have to run JSON.par

Re: [Rails] text visible in browser but not in source

2018-12-30 Thread Colin Law
On Sun, 30 Dec 2018 at 12:06, fugee ohu wrote: > ... > It's not json it's javascript so I don't have to run JSON.parse {"success":true,"code":0,"results":[{"productId":3281905, ... Looks like JSON to me (embedded in js admittedly). You said that the data you want is in that string. If that

Re: [Rails] Re: text visible in browser but not in source

2018-12-29 Thread Colin Law
On Sat, 29 Dec 2018 at 11:16, fugee ohu wrote: > ... > It's not clear to me what the response is Can the problem be that my request > is the full url with callback and other query string data Should I just be > calling the script without invoking the Struts framework callback but still >

Re: [Rails] Re: text visible in browser but not in source

2018-12-29 Thread Colin Law
On Sat, 29 Dec 2018 at 10:36, fugee ohu wrote: > > json_data = res.body.gsub(/^.+{/, "{").chomp(");") > json = JSON.parse(json_data) > JSON::ParserError: 765: unexpected token at > '{\"pvid\":\"ff43f2dc-3f86-42a3-bfa8-49c117e9da6a\",\"scm-cnt\":\"1007.13482.95643.0\", Why have you posted this?

Re: [Rails] Re: text visible in browser but not in source

2018-12-29 Thread Colin Law
On Sat, 29 Dec 2018 at 09:37, fugee ohu wrote: > .. >>> JSON::ParserError: 765: unexpected token at >>> '({"success":true,"code":0,"results":[{"productId":32817 >> > ... > JSON::ParserError: 765: unexpected token at > '{\"pvid\":\"805ba4ee-6446-4148-ab0a-ff5e51c0ab24\",\" You have not only

Re: [Rails] Re: text visible in browser but not in source

2018-12-28 Thread Colin Law
On Sat, 29 Dec 2018, 03:42 fugee ohu > > On Friday, December 28, 2018 at 5:00:46 PM UTC-5, Colin Law wrote: >> >> On Fri, 28 Dec 2018 at 21:40, fugee ohu wrote: >> > ... >> > I think I just need to strip the leading >> /**/jQuery18307882

Re: [Rails] Re: text visible in browser but not in source

2018-12-28 Thread Colin Law
On Fri, 28 Dec 2018 at 21:40, fugee ohu wrote: > ... > I think I just need to strip the leading > /**/jQuery18307882633047005491_1545805999753 from the result > /**/jQuery18307882633047005491_1545805999753({"success":true,"code":0,"results":[{"productId":32817749905, > Anyone can help with the

Re: [Rails] text visible in browser but not in source

2018-12-28 Thread Colin Law
On Fri, 28 Dec 2018 at 15:53, fugee ohu wrote: > ... > I don't know what a valid json response is supposed to look like Also I don't > know if it makes a difference they're using Struts framework Once again I have googled for a link for you https://www.w3schools.com/whatis/whatis_json.asp

Re: [Rails] text visible in browser but not in source

2018-12-28 Thread Colin Law
On Fri, 28 Dec 2018 at 14:19, fugee ohu wrote: > > > > On Friday, December 28, 2018 at 8:38:14 AM UTC-5, Colin Law wrote: >> >> On Fri, 28 Dec 2018 at 12:58, fugee ohu wrote: >> > ... >> > Yes the sources tab showed the script and it's output, a string,

Re: [Rails] text visible in browser but not in source

2018-12-28 Thread Colin Law
On Fri, 28 Dec 2018 at 12:58, fugee ohu wrote: > ... > Yes the sources tab showed the script and it's output, a string, but how do I > parse it into an object? If it is a JSON string then JSON.parse should do it. If it is not then perhaps you need to strip something off to get to be valid

Re: [Rails] text visible in browser but not in source

2018-12-27 Thread Colin Law
On Thu, 27 Dec 2018 at 22:00, fugee ohu wrote: > > > > On Thursday, December 27, 2018 at 4:04:55 PM UTC-5, Hassan Schroeder wrote: >> >> On Thu, Dec 27, 2018 at 12:24 PM fugee ohu wrote: >> >> > So then how >> >> 1) choose HTTP client >> 2) send request >> 3) parse response >> >> -- >> Hassan

Re: [Rails] text visible in browser but not in source

2018-12-26 Thread Colin Law
On Tue, 25 Dec 2018 at 20:19, fugee ohu wrote: > > yes, there's scripts running and when i click response i see the data i'm > looking for The script names are https urls ending in .do? with a lot of > query string data, so what should I do? Don't worry about scripts for the moment, look for

Re: [Rails] Could not find eventmachine-1.0.9.1 in any of the sources

2018-12-16 Thread Colin Law
On Sun, 16 Dec 2018 at 15:39, Colin Law wrote: > > On Sun, 16 Dec 2018 at 15:33, fugee ohu wrote: > > > > App 25334 output: Error: The application encountered the following error: > > Could > > not find eventmachine-1.0.9.1 in any of the sources (Bundler::GemNotFo

Re: [Rails] Could not find eventmachine-1.0.9.1 in any of the sources

2018-12-16 Thread Colin Law
On Sun, 16 Dec 2018 at 15:33, fugee ohu wrote: > > App 25334 output: Error: The application encountered the following error: > Could > not find eventmachine-1.0.9.1 in any of the sources (Bundler::GemNotFound) > > How do i find out what gem's causing rails to look for this dependency? >

Re: [Rails] can't find eventmachine 0.9.0.1

2018-12-16 Thread Colin Law
On Sun, 16 Dec 2018 at 15:18, Colin Law wrote: > > On Sun, 16 Dec 2018 at 15:16, fugee ohu wrote: > > > > my site works in development but in production i get this error that it > > doesn't find eventmachine 0.9.0.1 (eventmachine 1.2.7 is installed) i dunno > &g

Re: [Rails] can't find eventmachine 0.9.0.1

2018-12-16 Thread Colin Law
On Sun, 16 Dec 2018 at 15:16, fugee ohu wrote: > > my site works in development but in production i get this error that it > doesn't find eventmachine 0.9.0.1 (eventmachine 1.2.7 is installed) i dunno > if it's rspec or rgenerator or what gem is trying to depend on eventmachine > 0.9.0.1

Re: [Rails] intermittent ASCII-8BIT and UTF-8

2018-12-14 Thread Colin Law
On Fri, 14 Dec 2018 at 18:31, tom wrote: > > hi, > > i am getting the error above in a _form. > > i have taken the form 100times apart, put back together, i have all > utf8 settings in place. > > i just realized that it actually doesnt come all the time, when i > reload the page couple of times,

Re: [Rails] Can start a new Rails app with Ruby 2.5.0 but not in 2.5.3

2018-11-29 Thread Colin Law
On Thu, 29 Nov 2018 at 05:54, Jason Hsu wrote: > > 2. When I correct the Gemfile, I get the message "Your Ruby version is > 2.5.0, but your Gemfile specified 2.5.3" when I run "rails db:migrate". Did you run bundle install after changing the ruby version in Gemfile? Colin -- You received

Re: [Rails] [Ask] i want to make widget comparison from On Travel Agency

2018-11-13 Thread Colin Law
Keep on asking the same question every two hours, that is a strategy that is bound to work eventually. Colin On Tue, 13 Nov 2018 at 18:17, Handbo wrote: > > Hello There, > > I want to make widget comparison from On Travel Agency (Expedia, Booking.com, > many more). what should I do ? > > i need

Re: [Rails] text visible in browser but not in source

2018-11-10 Thread Colin Law
On Sat, 10 Nov 2018 at 21:28, fugee ohu wrote: > > > > On Saturday, November 10, 2018 at 12:26:40 PM UTC-5, Colin Law wrote: >> >> On Sat, 10 Nov 2018 at 17:23, fugee ohu wrote: >> > ... >> > It wasn't shown in source but when I expanded the element rec

Re: [Rails] text visible in browser but not in source

2018-11-10 Thread Colin Law
On Sat, 10 Nov 2018 at 17:23, fugee ohu wrote: > ... > It wasn't shown in source but when I expanded the element recursively in > chrome developer tools I saw the text I was looking for So, what's that gonna > be worth? As has been said a number of times that will be because it was filled in

Re: [Rails] text visible in browser but not in source

2018-11-08 Thread Colin Law
On Thu, 8 Nov 2018 at 06:09, fugee ohu wrote: > ... > Thanks Can you point me to a brief tutorial to show me how to get react to > render the content Open it in a browser, that's what browsers do. Note there may well be successive requests back to the server to get the data you are looking

Re: [Rails] why is HTTP_HOST set to "wrong" value on 2nd nginx server ?

2018-11-07 Thread Colin Law
On Wed, 7 Nov 2018 at 19:05, tom wrote: > > hi, > > i have a nginx server serving a ror app (1). > > now i have added a second server section , different server_name > directive in nginx.conf serving up the same app but with a different > layout based on controlle rlogic based on the HOST_NAME. >

Re: [Rails] text visible in browser but not in source

2018-11-07 Thread Colin Law
On Wed, 7 Nov 2018 at 16:17, fugee ohu wrote: > > Yes, within that context, javascript, how does it happen that the text I'm > viewing in the browser isn't visible in source? It isn't in the source, the DOM is updated using javascript. You should see it in the DOM inspector but not in the

Re: [Rails] text visible in browser but not in source

2018-11-07 Thread Colin Law
I should think that javascript is involved. I am sure you asked a similar question before when you were trying to scrape a website and couldn't find the text in the html. Colin On Wed, 7 Nov 2018 at 15:35, fugee ohu wrote: > > I'm not very good with the consoles in chrome and firefox but I

Re: [Rails] split function splitting on spaces when data contains spaces also

2018-11-04 Thread Colin Law
Can't you just use regular expressions to split it up? Like this for example https://www.oreilly.com/library/view/scala-cookbook/9781449340292/ch01s09.html Colin On Sun, 4 Nov 2018 at 21:18, fugee ohu wrote: > > I'm trying to split on spaces but one of the data columns has spaces in it > and

Re: [Rails] How do I create an image object from a remote image url

2018-10-29 Thread Colin Law
On Mon, 29 Oct 2018 at 11:54, fugee ohu wrote: > > > On Monday, October 29, 2018 at 4:48:42 AM UTC-4, Colin Law wrote: >> >> On Mon, 29 Oct 2018 at 05:08, fugee ohu wrote: >> >>> How do I create an image object from a remote image url in rails console >&g

Re: [Rails] How do I create an image object from a remote image url

2018-10-29 Thread Colin Law
On Mon, 29 Oct 2018 at 05:08, fugee ohu wrote: > How do I create an image object from a remote image url in rails console > What do you mean by image object? Colin > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe

Re: [Rails] Re: Having a problem figuring out how to structure this... Nesting issue

2018-10-25 Thread Colin Law
On Wed, 24 Oct 2018 at 23:21, John Sanderbeck wrote: > One question though... For a through association, I have to have a join > table for the association. > No, if you say Reason has_many :data_entries, :through: :assessment then since you already have reason belongs_to assessment so if you

Re: [Rails] directory listing to database

2018-10-24 Thread Colin Law
You could use one of the shell commands [1] which will give you back the directory listing direct to your code. No need for an intermediate file. However, if you google for ruby directory listing it will show you much better ways. Usually google will be much quicker for asking such questions

Re: [Rails] Re: Having a problem figuring out how to structure this... Nesting issue

2018-10-24 Thread Colin Law
Certainly you only need to specify the associations you need to use. Colin On Wed, 24 Oct 2018 at 14:44, John Sanderbeck wrote: > > Hmmm... That may work... > > I would always be accessing assessment.data_entries for any lists or views. > Reasons and Consequences are basically select criteria

Re: [Rails] Having a problem figuring out how to structure this... Nesting issue

2018-10-24 Thread Colin Law
On Wed, 24 Oct 2018 at 12:12, John Sanderbeck wrote: > > I'm working on a project that has the following setup > > I have a table called Assessment > > for each assessment there can be different reasons and consequences defined > for that assessment > > then for each assessment the teacher takes

Re: [Rails] Re: got this issue in production, but it works in development?

2018-10-19 Thread Colin Law
Work through railstutorial.org, it includes testing. It is free to use online. Colin On Fri, 19 Oct 2018 at 15:51, Joe Guerra wrote: > I don't know how to write tests yet. :) > Maybe I need to find someone who can give me a few private lessons. > > On Fri, Oct 19, 2018 at 10:49

Re: [Rails] Re: got this issue in production, but it works in development?

2018-10-19 Thread Colin Law
gt; > I changed it to > format.html { redirect_to root_path, notice: 'Not sure what > happened... please contact tech support.'} > > At least it doesn't crash now. lol. > > > On Friday, October 19, 2018 at 10:24:36 AM UTC-4, Colin Law wrote: >> >> On Fri, 19 Oct

Re: [Rails] Re: got this issue in production, but it works in development?

2018-10-19 Thread Colin Law
On Fri, 19 Oct 2018 at 14:43, Joe Guerra wrote: > > Ok , I fixed this error. It's not crashing but it's not saving the last item > either [or processing the order...] > > On Friday, October 19, 2018 at 9:24:26 AM UTC-4, Joe Guerra wrote: >> >> Here's a snippet of the log from heroku. >> >>

Re: [Rails] find li by class with nokogiri parse html

2018-10-08 Thread Colin Law
On Mon, 8 Oct 2018 at 17:36, fugee ohu wrote: > > > On Monday, October 8, 2018 at 9:24:26 AM UTC-4, Colin Law wrote: >> >> Why have you got a space after li? >> >> Colin >> >> On Mon, 8 Oct 2018 at 12:07, fugee ohu wrote: >> >>> I

Re: [Rails] nokogiri parse html find

2018-10-08 Thread Colin Law
Why have you posted the same question twice? On Mon, 8 Oct 2018 at 12:13, fugee ohu wrote: > This code isn't right I'm trying to find > pry(main)> rows=list.css("li .some-class") > > list above is a valid object already created on a preceeding line > > -- > You received this message because

Re: [Rails] find li by class with nokogiri parse html

2018-10-08 Thread Colin Law
Why have you got a space after li? Colin On Mon, 8 Oct 2018 at 12:07, fugee ohu wrote: > I'm trying to find > pry(main)> rows=mylist.css("li .brand-content") > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from

Re: [Rails] Why doesn't anyone answer my question am i blacklisted?

2018-09-29 Thread Colin Law
On Sun, 30 Sep 2018, 06:19 Ralph Shnelvar, wrote: > fugee, > > (a) Perhaps no one knows the answer. > (b) It's a weekend. > (c) You ask so many questions that are often not easy to understand that many do not bother trying any more. Colin > Ralph > > > > Saturday, September 29, 2018,

Re: [Rails] Re: how does gmail show new messages as they arrive

2018-09-16 Thread Colin Law
On Mon, 17 Sep 2018, 02:51 fugee ohu, wrote: > Does it matter if my rails app is an api app or not? > Define (in terms of models and controllers) in what way they differ. Colin > On Sunday, September 16, 2018 at 7:33:00 AM UTC-4, Rob Jonson wrote: >> >> The rails way to do this (update page

Re: [Rails] upgrade model containing attr_accessible

2018-09-03 Thread Colin Law
On Sun, 2 Sep 2018 at 21:55, fugee ohu wrote: > ... > There's no message model The messages are the receipts They belong to > notifications which belong to conversations How can messages belong to notifications if there is no Message model? Colin -- You received this message because you are

Re: [Rails] Re: Git forking: adding elements to my personal repository but not the original

2018-08-28 Thread Colin Law
On Tue, 28 Aug 2018 at 17:29, Jason Hsu, Ruby on High Speed Rails wrote: > > Yes, I'm talking about GitHub. I know how to fork a project. I can create a > new branch and then submit the branch as a pull request. > > What I'm not clear on is how to add elements to the project (like the Bash >

Re: [Rails] Re: Git forking: adding elements to my personal repository but not the original

2018-08-28 Thread Colin Law
Exactly how you do it depends on where the repository is. Are we talking github? Which bit don't you know how to do? If it is basic git operation help you need then there are many tutorials out there. Colin On Tue, 28 Aug 2018 at 17:09, Jason Hsu, Ruby on High Speed Rails wrote: > > Let's say

Re: [Rails] Git forking: adding elements to my personal repository but not the original

2018-08-28 Thread Colin Law
On Tue, 28 Aug 2018 at 16:10, Jason Hsu, Ruby on High Speed Rails wrote: > > As you know, a way to contribute to a project without being a collaborator is > to fork a project, create a branch, make the changes in your new branch, and > submit the new branch as a pull request. > > There are

Re: [Rails] updating records

2018-08-26 Thread Colin Law
>> > the process is add to cart my show page updates quantity... and if >> > it reached 0 now i've got it updating and redirecting to root_path. >> > >> > works like a charm. (not sure if that's optimal). >> > >> > On Wednesday, August

Re: [Rails] updating records

2018-08-22 Thread Colin Law
you meant the view. But surely you are not changing the quantity in that action, I would have expected a change in quantity to be in an Update action. Colin > > On Wed, Aug 22, 2018, 12:00 PM Colin Law, wrote: >> >> On Wed, 22 Aug 2018 at 16:54, Joe Guerra wrote: >> &g

Re: [Rails] updating records

2018-08-22 Thread Colin Law
blah..." > > Thanks, > Joe > > > On Wednesday, August 22, 2018 at 11:46:26 AM UTC-4, Colin Law wrote: >> >> On Wed, 22 Aug 2018 at 16:31, Joe Guerra wrote: >> > >> > ok, well I need to flip a few boolean values to begin the group order >> > proce

Re: [Rails] updating records

2018-08-22 Thread Colin Law
On Wed, 22 Aug 2018 at 16:31, Joe Guerra wrote: > > ok, well I need to flip a few boolean values to begin the group order process. Oh, you mean that when the amount goes to zero you need to take some action? In that case that should probably be initiated by the action that sets it zero, either

Re: [Rails] updating records

2018-08-22 Thread Colin Law
On Wed, 22 Aug 2018 at 15:36, Joe Guerra wrote: > > > I know how to update records, but not sure where I should put my code when > product qty == 0. > I do have a flash notice on the show page that displays a message when the > last item is left. > > Should I put update the records on the show

Re: [Rails] Horrible migration path?

2018-08-22 Thread Colin Law
On Wed, 22 Aug 2018 at 14:30, Robert Nicholson wrote: > ... > Are there any migration guides that highlight the complexity involved? This is a good place to start https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html Colin -- You received this message because you are subscribed to

Re: [Rails] Re: reciprocating relationships

2018-08-13 Thread Colin Law
On Mon, 13 Aug 2018 at 03:49, fugee ohu wrote: > > Can we revisit this one I'm doing a family tree and trying to manage > spousal relationships so i have person has_many people through: > :partnerships But now partnerships can't have person_id twice so this is > perplexing me > Google for rails

Re: [Rails] Looking for help on how to incorporate Stripe into my existing files

2018-08-12 Thread Colin Law
On Sun, 12 Aug 2018 at 09:00, M.Dumlupinar wrote: > i need to quit this group, too. but i was unable to do so. there is no way > for cancelling my subscription. i mean, unsubscribe link at the bottom of > every message in this group does not work. > Go to the group page and do it from there

Re: [Rails] bootstrap cards

2018-08-10 Thread Colin Law
On Fri, 10 Aug 2018 at 12:38, Mauro Sanna wrote: > Please delete me. > As Walter said when you posted this request previously: "There is a link at the bottom of each message you receive from this list, where you can do just that. Nobody else here can delete you, we are all users, not admins."

Re: [Rails] Rails 5.0.7 version upgrade issues

2018-08-03 Thread Colin Law
On 3 August 2018 at 18:35, Piyush Chowhan wrote: > Hi, > > Rails 5.0.7 > Ruby 2.5.1 > > Facing this error while upgrading rails 4 to rails 5.0.7 > > undefined method `[]' for "image":Sass::Script::Value:: String > > Any help would be appreciated. > Did you follow the procedure described in

Re: [Rails] ransack replacement?

2018-08-01 Thread Colin Law
On 1 August 2018 at 21:50, Joe Guerra wrote: > Hi, what should I use to replace ransack with? It's no longer supported > in the rails version I'm using (4.2.8), and If I upgrade rails I'll break > devise :( > Can't you just stick with the version of ransack that runs with 4.2.8? Colin --

Re: [Rails] How do i web scrape aliexpress from rails (console) or app

2018-07-29 Thread Colin Law
On 29 July 2018 at 03:43, fugee ohu wrote: > > > On Saturday, July 28, 2018 at 10:43:37 AM UTC-4, Colin Law wrote: >> >> On 28 July 2018 at 15:32, fugee ohu wrote: >> >>> >>> >>> On Saturday, July 28, 2018 at 2:53:59 AM UTC-4, Colin La

Re: [Rails] How do i web scrape aliexpress from rails (console) or app

2018-07-28 Thread Colin Law
On 28 July 2018 at 15:32, fugee ohu wrote: > > > On Saturday, July 28, 2018 at 2:53:59 AM UTC-4, Colin Law wrote: >> >> On 28 July 2018 at 00:15, fugee ohu wrote: >> >>> how do i webscrape aliexpress? i learned how to get a document object >>>

Re: [Rails] How do i web scrape aliexpress from rails (console) or app

2018-07-28 Thread Colin Law
On 28 July 2018 at 00:15, fugee ohu wrote: > how do i webscrape aliexpress? i learned how to get a document object > class Nokogiri::HTML containing the full html but there's no tables only ul > and li selectors and i'm having trouble with that > Give us an example of a page you are scraping

Re: [Rails] aliexpress developers api

2018-07-23 Thread Colin Law
On 23 July 2018 at 17:02, fugee ohu wrote: > > > On Monday, July 23, 2018 at 3:52:18 AM UTC-4, Colin Law wrote: >> >> On 23 July 2018 at 03:44, fugee ohu wrote: >> >>> ... >>> Well I'm looking for the aliexpress developers api registration page I

Re: [Rails] aliexpress developers api

2018-07-23 Thread Colin Law
On 23 July 2018 at 03:44, fugee ohu wrote: > ... > Well I'm looking for the aliexpress developers api registration page I > think this question is going to have wait for someone who's familiar with > their api to come along and read it > A google search for aliexpress developers api

Re: [Rails] aliexpress developers api

2018-07-21 Thread Colin Law
On 21 July 2018 at 13:15, fugee ohu wrote: > > > On Saturday, July 21, 2018 at 3:09:23 AM UTC-4, Colin Law wrote: >> >> On 20 July 2018 at 21:53, fugee ohu wrote: >> >>> Does anyone know where the registration is for aliexpress developers api >>

Re: [Rails] aliexpress developers api

2018-07-21 Thread Colin Law
On 20 July 2018 at 21:53, fugee ohu wrote: > Does anyone know where the registration is for aliexpress developers api > I am not certain exactly what you are asking, it doesn't appear to be Rails related, but perhaps this will help.

Re: [Rails] Continuing in Rails Console

2018-07-09 Thread Colin Law
On 9 July 2018 at 16:46, Ralph Shnelvar wrote: > ... > I am still at a loss how to continue execution at the irb prompt. > If you tell us what you mean by continue execution then someone may be able to help. What do you expect to happen when you tell it to continue execution? And don't just

  1   2   3   4   5   6   7   8   9   10   >