Re: [Rails] Action Controller: Exception caught.

2020-03-23 Thread Walter Lee Davis
It appears that you have configured a database, but that database isn't running correctly, or doesn't have a user named "root". That name is commonly used in a default MySQL install. If you're using a different database engine, then the default user may be named differently. That's where I

Re: [Rails] webrtc - anyone done multi video ?

2020-03-20 Thread Walter Lee Davis
> On Mar 19, 2020, at 9:59 PM, tom wrote: > > yes thank you, used them for sms... > > > > On Thu, Mar 19, 2020, 5:18 PM Walter Lee Davis wrote: > Have you looked at this yet? https://www.twilio.com/docs/video > > Walter > > > On Mar 19, 2020, at 5:00

Re: [Rails] webrtc - anyone done multi video ?

2020-03-19 Thread Walter Lee Davis
Have you looked at this yet? https://www.twilio.com/docs/video Walter > On Mar 19, 2020, at 5:00 PM, tom wrote: > > hi, > > i have just finished a webrtc chat via action cable, but before spending even > more time on it trying to get video on as well, i was wondering if anyone can > share

Re: [Rails] Is it worth switching to Postgresql?

2020-03-14 Thread Walter Lee Davis
> On Mar 14, 2020, at 12:17 PM, Rob Jonson wrote: > > thanks folks, > > I guess I'm asking more about the practical pain points. - As you say, I > trust rails to deal with most of the day-to-day. > > do you end up battling to get your postgres install working after upgrading > mac (or

Re: [Rails] Suggestions on how I should handle licensing in a session

2020-03-13 Thread Walter Lee Davis
That's what I would do. It's very low-drag that way. If you are horizontally-scaled, then you need to ensure that you have a central session store. Walter > On Mar 13, 2020, at 10:16 AM, John Sanderbeck wrote: > > In an app I wrote I implemented licensing for the modules in the app. > >

Re: [Rails] add user_id to new record

2020-03-02 Thread Walter Lee Davis
In your Controller's #new and #create methods, scope the post to be owned by the current_user (or whatever other scheme you may be using for your logged-in-user management). def new @post = current_user.posts.build end def create @post = current_user.posts.create(post_params) ... end

Re: [Rails] do i need associations to use fields_for

2020-02-16 Thread Walter Lee Davis
You may use fields_for for any object that you have declared "accepts_nested_attributes_for" in your form's parent model. It obviously makes the most sense to do this with a related object. Walter > On Feb 16, 2020, at 10:41 PM, fugee ohu wrote: > > Can I use fields_for for any models or do

Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread Walter Lee Davis
Is your form set to the default of an Ajax submission, or did you add the configuration flag to the form_with method call that makes it actually redirect? If this was a redirect, the header would be 301, not 200. Walter > On Feb 14, 2020, at 9:59 AM, fugee ohu wrote: > >  > This is a

Re: [Rails] how do i append an image to a dom element using javascript

2020-01-29 Thread Walter Lee Davis
https://lmgtfy.com/?q=how+do+i+append+an+image+to+a+dom+element+using+javascript > On Jan 29, 2020, at 12:18 AM, fugee ohu wrote: > > how do i append an image to a dom element using javascript > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on

Re: [Rails] How do I prevent rails from redirecting to request referrer after create

2020-01-27 Thread Walter Lee Davis
You can define (in your controller) what the create action is after a successful save, and if you only want to do that for one format, and not the others, you can use the usual method for doing that in a controller, with: if @foo.create(foo_params) respond_to do |format| if format.js

Re: [Rails] how do i send pictures in channels?

2020-01-19 Thread Walter Lee Davis
> On Jan 19, 2020, at 4:10 PM, fugee ohu wrote: > > Got my chat app working in rails 6 with channels but now how do I let users > send pictures in channels? I've seen chat apps where after you upload the > picture it displays with a circled button that says send and you can also > delete

Re: [Rails] How do I let users design their own blog with trix

2020-01-18 Thread Walter Lee Davis
> On Jan 17, 2020, at 6:29 PM, fugee ohu wrote: > > I know how to use trix in a field but how do I let users design their entire > page? > Trix is designed to be low- or no-design. The kinds of elements you can create with it (H1, P, FIGURE, UL, OL) are not, on their own, enough to

Re: [Rails] where do i put my production mail server settings?

2020-01-16 Thread Walter Lee Davis
> On Jan 16, 2020, at 6:19 PM, fugee ohu wrote: > > > > On Monday, December 30, 2019 at 2:48:06 PM UTC-5, Walter Lee Davis wrote: > > > > On Dec 29, 2019, at 11:44 PM, fugee ohu wrote: > > > > I searched my entire tree starting at / for the name

Re: [Rails] where do i put my production mail server settings?

2019-12-30 Thread Walter Lee Davis
> On Dec 29, 2019, at 11:44 PM, fugee ohu wrote: > > I searched my entire tree starting at / for the name of my mail server but > didn't find it Everything's working it sends mail in production just fine but > I'm trying to figure out how, since it seems I never put the url of my mail >

Re: [Rails] create chat view

2019-12-26 Thread Walter Lee Davis
> On Dec 24, 2019, at 4:38 AM, fugee ohu wrote: > > I'm trying to create a chat view where if the sender of the message is the > current user then the message is displayed on the right side and if the > sender is the other user then the message is displayed on the left So far > what I have

Re: [Rails] rails g scaffold creates strange form

2019-12-15 Thread Walter Lee Davis
> On Dec 15, 2019, at 9:54 AM, fugee ohu wrote: > > How do I ensure that webpacker doesn't know anything about my favicon I > removed the favicon lines in application.js and renamed favicons.js to > favicons.js.renamed and than ran `rake webpacker:compile` (not that i know > what that's

Re: [Rails] rails g scaffold creates strange form

2019-12-14 Thread Walter Lee Davis
Sorry, I meant link tag, not meta tag. Walter > On Dec 14, 2019, at 2:31 PM, Walter Lee Davis wrote: > > normal meta tag -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop re

Re: [Rails] rails g scaffold creates strange form

2019-12-14 Thread Walter Lee Davis
> On Dec 14, 2019, at 4:42 AM, fugee ohu wrote: > > > > On Friday, December 13, 2019 at 9:41:29 PM UTC-5, Walter Lee Davis wrote: > You're looking at the id. If you look at how the form renders in a browser, > the name property will be the usual Rails nes

Re: [Rails] rails g scaffold creates strange form

2019-12-14 Thread Walter Lee Davis
> On Dec 14, 2019, at 4:50 AM, fugee ohu wrote: > > > > On Friday, December 13, 2019 at 9:41:29 PM UTC-5, Walter Lee Davis wrote: > You're looking at the id. If you look at how the form renders in a browser, > the name property will be the usual Rails nes

Re: [Rails] rails g scaffold creates strange form

2019-12-13 Thread Walter Lee Davis
You're looking at the id. If you look at how the form renders in a browser, the name property will be the usual Rails nested format: I can't be bothered to write out an entire set of select tags, just imagine if datetime_select was written as date_tag. That's how it would render. Walter >

Re: [Rails] rails g scaffold creates strange form

2019-12-13 Thread Walter Lee Davis
> On Dec 13, 2019, at 4:40 AM, fugee ohu wrote: > > In this form created by the scaffold generator all the field names are > prepended with the table_name plus underscore What causes this to happen in > rails 5.1.7 > > > <%= form.label :start_date %> > <%= form.datetime_select

Re: [Rails] new action doesn't render from other model's index page

2019-12-01 Thread Walter Lee Davis
> On Dec 1, 2019, at 10:17 PM, fugee ohu wrote: > > A generic scaffold posts to the create action PATCH and PUT according to you > in this discussion POST to update Even still new is fetched by GET where > new.html.erb renders _form.html.erb > > I'm not sure if you're confused about

Re: [Rails] new action doesn't render from other model's index page

2019-12-01 Thread Walter Lee Davis
t figured out, don't waste your energy on rendering a different form. Walter > On Dec 1, 2019, at 3:17 PM, fugee ohu wrote: > > > > On Sunday, December 1, 2019 at 12:49:53 PM UTC-5, Walter Lee Davis wrote: > That's just it, you don't. You POST to the collection, which `cr

Re: [Rails] new action doesn't render from other model's index page

2019-12-01 Thread Walter Lee Davis
Sorry, typo here: > On Dec 1, 2019, at 12:49 PM, Walter Lee Davis wrote: > > @item = Item.new(item_type = params[:item_type]) @item = Item.new(item_type: params[:item_type]) I meant hash syntax, not assignment. Walter -- You received this message because you are subscribed to t

Re: [Rails] new action doesn't render from other model's index page

2019-12-01 Thread Walter Lee Davis
That's just it, you don't. You POST to the collection, which `create`s a new instance. If you are expecting the GET with a querystring to create a new form with a picker selected, you should start by creating the form all in one piece, where you create a new form including a select (like the

Re: [Rails] new action doesn't render from other model's index page

2019-12-01 Thread Walter Lee Davis
> On Dec 1, 2019, at 8:08 AM, fugee ohu wrote: > > When I click submit nothing happens The console only shows the request > > items/index.html.erb: > > <%= form_with model: Item, url: new_item_path(@item), method: "get" do |f| %> Your problem is right here. You are using a GET where you

Re: [Rails] how to use form_with

2019-11-18 Thread Walter Lee Davis
> On Nov 18, 2019, at 3:20 PM, fugee ohu wrote: > > > > On Monday, November 18, 2019 at 2:56:24 PM UTC-5, Rob Zolkos wrote: > Have you read the Rails API docs and Rails Guides for usage of form_with? > > https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with

Re: [Rails] build method

2019-11-01 Thread Walter Lee Davis
> On Nov 1, 2019, at 2:12 AM, fugee ohu wrote: > > > > On Friday, November 1, 2019 at 12:12:18 AM UTC-4, Ariel Juodziukynas wrote: > If you have: > item has_many item_item_properties > item_item_property belongs_to item_property > > then you can add a relationship on the item model > >

Re: [Rails] help on building a microservice that can receive an uploaded image

2019-10-07 Thread Walter Lee Davis
t tell you more about how to integrate it there. Walter > On Oct 6, 2019, at 10:44 AM, bouazza Mohamed wrote: > > Do you have some examples for using this , > > I found cloudinary gem , they already did some good work on image management > pipeline. > > On Sun, Oct

Re: [Rails] help on building a microservice that can receive an uploaded image

2019-10-06 Thread Walter Lee Davis
Ruby has SecureRandom for this sort of thing: https://docs.ruby-lang.org/en/2.4.0/SecureRandom.html Walter > On Oct 6, 2019, at 5:08 AM, bouazza Mohamed wrote: > > Hi everyone , > I have a job interview test to build a simple microservice that can receive > an uploaded image and return a

Re: [Rails] Why do I have to require bootstrap if I'm using the gem

2019-09-20 Thread Walter Lee Davis
If you mean in your JavaScript or (S)CSS "application" pages, that's because there's no other mechanism that a gem could use to auto-mount the paths there. The Bootstrap gem is essentially just providing packaging for the JS and CSS that is Bootstrap. That last few inches is you adding it to

Re: [Rails] Carrierwave multiple file uploads

2019-09-15 Thread Walter Lee Davis
My understanding is that the helpers do the "80%" solution for you -- pave the cowpaths -- but expect you to do the edge cases yourself, since you know what you are doing and what you want. Too much "magic" breeds a complacent user that expects everything to just work, all the time, which is

Re: [Rails] database maintenance, updating tables having has_many_through relationships

2019-09-14 Thread Walter Lee Davis
Is this something you'd like to maintain automatically, or just do once? You remember how to use the console (if the latter)? Picture.find_each do |pic| pic.update caption: pic.item.caption end If you want to do it every time you save a new picture, then you can add a similar helper to the

Re: [Rails] Difficulty verifying site ownership for google search console

2019-08-31 Thread Walter Lee Davis
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

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

2019-08-17 Thread Walter Lee Davis
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 native operating system, because that's what you're actually doing.

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

2019-08-16 Thread Walter Lee Davis
Ruby will happily co-exist with python, if you want to "shell out" to that language, you can read the response back in and continue in Ruby. There are at least three ways to do this, from the humble back-tick ` operator to Open3 or the system call. And, hang on, there's Terrapin

Re: [Rails] How do I let nginx know I'm using rails?

2019-08-16 Thread Walter Lee Davis
Passenger is an application server that can either run as a plug-in to a web server, just like fastcgi or mod_php, or as a stand-alone server. When it runs as a stand-alone server, it actually uses an embedded copy of nginx as part of its code—but don’t let that confuse you. It’s still an

Re: [Rails] How do I let nginx know I'm using rails?

2019-08-16 Thread Walter Lee Davis
a reverse proxy in NGINX". Do what you see in the results. That's how you set this up. Walter > On Aug 15, 2019, at 10:03 PM, fugee ohu wrote: > > > > On Thursday, August 15, 2019 at 2:51:44 PM UTC-4, Walter Lee Davis wrote: > Set up a reverse proxy in nginx, poi

Re: [Rails] How do I let nginx know I'm using rails?

2019-08-15 Thread Walter Lee Davis
Set up a reverse proxy in nginx, pointed from port [80,443] to whatever port your application server [puma, unicorn, webrick] is listening at. Walter > On Aug 15, 2019, at 2:43 PM, fugee ohu wrote: > > How do I let nginx know I'm using rails when I'm not using passenger but > instead system

Re: [Rails] ActiveStorage links are too long!

2019-08-11 Thread Walter Lee Davis
cached by browsers, > ever. Jeez... > > Looks like ActiveStorage is a unique tool for certain things in Basecamp, not > a Carrierwave substitute. Am I right? > > On Monday, August 12, 2019 at 2:39:21 AM UTC+3, Walter Lee Davis wrote: > I'm not an author of this gem, but a

Re: [Rails] ActiveStorage links are too long!

2019-08-11 Thread Walter Lee Davis
I'm not an author of this gem, but at a guess, I would say that the lengthy URLs are there to ensure that there is no chance of two people uploading a same-name file and getting a collision. Those look a lot like UUIDs, which are often used for this purpose. Remember, when you drag something

Re: [Rails] Basics: How does Javascript communicate with Ruby on Rails?

2019-08-08 Thread Walter Lee Davis
Well, in my particular case, I already understood the way that the controller accepts the incoming request and assigns the attributes. That understanding came from many many years of working in Rails. The save part I understood intuitively, because years ago, I wrote an implementation of

Re: [Rails] Basics: How does Javascript communicate with Ruby on Rails?

2019-08-07 Thread Walter Lee Davis
Here's an incoming form submission: Started POST "/coupons" for ::1 at 2019-08-07 20:52:23 -0400 Processing by CouponsController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"xyBXVRs1DfQlkDxXlG/iTmxDMChOsPVfcgbNGX8dNOi5uPwfyBluAXcPFssxf5IQLPyoP2VWSPVjzZKeudwrHA==",

Re: [Rails] Basics: How does Javascript communicate with Ruby on Rails?

2019-08-07 Thread Walter Lee Davis
On the JS side, the JavaScript application (or simple inline script, no difference) makes an HTTP request to or from the server, and the server (Rails) responds to that request, just as it would any other request. The Rails framework uses the "accept" headers sent as part of that request to

Re: [Rails] Drag and Drop question

2019-07-21 Thread Walter Lee Davis
gt; the meals easily with an IPad. > > John > > On Saturday, July 20, 2019 at 8:59:21 PM UTC-4, Walter Lee Davis wrote: > I'm not sure how your form is constructed at the moment. But if you were > passing the result of the dragged items back to a meals_controller, you could > assig

Re: [Rails] Drag and Drop question

2019-07-20 Thread Walter Lee Davis
I'm not sure how your form is constructed at the moment. But if you were passing the result of the dragged items back to a meals_controller, you could assign the array of values to `menu_item_ids` and the child menu items would be created and assigned. You'll have to ensure that you whitelist

Re: [Rails] Drag and Drop question

2019-07-19 Thread Walter Lee Davis
What happens now when you drop the element? Do you see anything in your browser's JavaScript console indicating that the drop event fired? Did you do anything beyond CSS (to make it look a particular way) to define the draggable and droppable behaviors for these elements? Do the draggable

Re: [Rails] New Business Unit/Team Cannot See Assigned Accounts/Records

2019-07-05 Thread Walter Lee Davis
I'm not sure what this has to do with Ruby on Rails. As far as I can tell, Dynamics 365 is a Microsoft accounting application. Rails is an open-source framework for building Web applications. The only place their circles cross is that you could probably build a similar application as Dynamics

Re: [Rails] Querying Multi Database Tables and displaying in index.html.erb

2019-06-26 Thread Walter Lee Davis
the parent page. Walter > On Jun 25, 2019, at 11:18 PM, David Merrick wrote: > > HI What would the render partial: 'cities_picker', layout: false look like > in your example? > > On Fri, May 31, 2019 at 2:25 PM Walter Lee Davis wrote: > What do the pickers mean? What value

Re: [Rails] Querying Multi Database Tables and displaying in index.html.erb

2019-05-30 Thread Walter Lee Davis
quot;race_id"], name: "index_points_on_race_id" > end > > Which references the other tables. Are you saying I could just use this > table or do I still need the Pickers controller? > > Cheers Dave > > On Fri, May 31, 2019 at 1:23 AM Walter Lee Davis wr

Re: [Rails] Querying Multi Database Tables and displaying in index.html.erb

2019-05-30 Thread Walter Lee Davis
s are there for you to build whatever you want, or whatever makes sense to you. Walter > On May 30, 2019, at 12:15 AM, David Merrick wrote: > > Hi Can I just do rails g controller Pickers? > > How do I get the route for this as not one is made? > > Cheers Dave > &

Re: [Rails] Querying Multi Database Tables and displaying in index.html.erb

2019-05-28 Thread Walter Lee Davis
The way I start doing this is to decompose the view into partials, at least one per picker. Make sure that each partial after the first one takes an argument (allowed to be null) indicating what the previous picker chose. If there is no argument passed, the picker is rendered with no options.

Re: [Rails] loading localhost:3000/projectszzzzz takes forever to load > 2min

2019-05-23 Thread Walter Lee Davis
Turn your logging level up to debug, and watch the queries that are being generated by ActiveRecord in order to load this route. Are you seeing multiple requests to the database, or one big honking joined query? Sometimes using joins is slower than eager loading (which generally loads in two or

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread Walter Lee Davis
gt; Rails will infere the show action with the proper controller and id from the > object's class > > El mar., 21 may. 2019 a las 16:03, Walter Lee Davis () > escribió: > You could use > > link_to 'Index', url_for(controller: controller_name, action: :index) > &

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread Walter Lee Davis
> know how to "pick" the right 'path' while creating the html table... > > > thx > > > On Tue, May 21, 2019 at 2:49 PM Walter Lee Davis wrote: > The projects path isn't coming from the controller, it's coming from the > routes file. Do you have any refere

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread Walter Lee Davis
The projects path isn't coming from the controller, it's coming from the routes file. Do you have any references in your routes.rb file that mention projects? Walter > On May 21, 2019, at 2:46 PM, tom wrote: > > hi, i have a generic _index partial, but i am struggling with constrcuting > the

Re: [Rails] after_rollback on :create not triggered

2019-05-20 Thread Walter Lee Davis
It seems possible that the on: attribute is not referenced in the after_rollback callback. Is it listed in the documentation? You could probably get the same result by adding a test inside your method: after_rollback { return if persisted? // whatever else here } This will only ever

Re: [Rails] jquery drop down hover

2019-04-03 Thread Walter Lee Davis
> On Apr 3, 2019, at 8:05 PM, Joe Guerra wrote: > > my rails app is versio 5.0.7. > > I did change //= jquery to //=jquery3 (and it loaded jquery 3.3.1 in the > production environment on heroku). > > so that wasn't the issue, it's just that my jquery scripts don't seem to run > :( >

Re: [Rails] Fetch check box id's into arry from one table to other table

2019-03-25 Thread Walter Lee Davis
> On Mar 25, 2019, at 7:37 AM, Piyush Chowhan wrote: > > Hi, > > > <%= f.check_box :tax_rates, :name => "tax_group[tax_rates][]", :value => > tax_rate.id %> > > I want to fetch tax_rate.id to other table which is selected in the check > box? > > The check box which is selected those

[Rails] How do you generically call a scope on a model?

2019-03-17 Thread Walter Lee Davis
I want to (in a metaprogramming context) invoke a scope on an ActiveRecord based model. I know the name of the scope, but I don't want to use `send` to do this, because send can be evil. I know that ActiveRecord defines a class method named scope that gathers up these scopes somewhere

Re: [Rails] Leaking authenticity_token in logs

2019-03-16 Thread Walter Lee Davis
They are only valid for 15 minutes and then they are never going to work again. They don't matter. I suppose if you had enough of them you could brute-force out what the secret key was, but that's a nation-state level of effort. Are your users (or their haters) in that league? Walter > On Mar

Re: [Rails] Sass-rails

2019-03-10 Thread Walter Lee Davis
> On Mar 10, 2019, at 6:17 PM, brainiacs...@gmail.com wrote: > > Hi Everyone, > > I was just curious as to what everyone is using since sass-rails is > depreciating and if I add a ui kit it should change the look and feel of the > app without have to change a great deal of the css. Correct?

Re: [Rails] Rake aborted!

2019-03-10 Thread Walter Lee Davis
Correct. Your server does not have a JavaScript interpreter available at the command line. These days, I just install whatever version of NodeJS is in the package manager for that server. If you want to avoid any server dependencies, you can just add therubyracer to your Gemfile and bundle on

Re: [Rails] Database dump and import

2019-03-10 Thread Walter Lee Davis
Just the schema. For the data, you'd need to run a backup utility of some sort. On MySQL, there's mysqldump, I'm pretty sure there's similar on the Postgres side, so no matter which direction you want to go, you'd be set. Be sure to only dump the data, not the structure, if you're using the

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

2019-03-08 Thread Walter Lee Davis
> On Mar 8, 2019, at 9:18 AM, Colin Law wrote: > > 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

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

2019-03-08 Thread Walter Lee Davis
> On Mar 8, 2019, at 7:40 AM, Colin Law wrote: > > 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.

Re: [Rails] Has anyone seen these errors?

2019-03-07 Thread Walter Lee Davis
> > On Thursday, March 7, 2019 at 1:48:36 PM UTC-5, Walter Lee Davis wrote: > Someone else answered this already. Use the _underscore_ trick to force a > particular version of bundler to run the command: > > bundle _2.0.0_ update ... > > See if that works. >

Re: [Rails] Has anyone seen these errors?

2019-03-07 Thread Walter Lee Davis
Someone else answered this already. Use the _underscore_ trick to force a particular version of bundler to run the command: bundle _2.0.0_ update ... See if that works. Walter > On Mar 7, 2019, at 1:03 PM, brainiacs...@gmail.com wrote: > > Hi David and Walter and everyone else, > > I ran

Re: [Rails] Has anyone seen these errors?

2019-03-07 Thread Walter Lee Davis
It sounds like you want to run bundle update to get your gems to update in concert. There are a lot of options in this area of bundler; read the docs, or browse bundle update --help in the console to see what you can do. Definitely make sure you have a new git branch if you start running this

Re: [Rails] Problem serving image assets

2019-03-06 Thread Walter Lee Davis
> On Mar 6, 2019, at 10:29 AM, Walter Lee Davis wrote: > >> >> 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 Da

Re: [Rails] Problem serving image assets

2019-03-06 Thread Walter Lee Davis
> 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 interpreter to work correctl

Re: [Rails] Problem serving image assets

2019-03-06 Thread Walter Lee Davis
> On Mar 6, 2019, at 9:27 AM, Walter Lee Davis wrote: > >> >> On Mar 6, 2019, at 7:15 AM, Colin Law wrote: >> >> 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.

Re: [Rails] Problem serving image assets

2019-03-06 Thread Walter Lee Davis
> On Mar 6, 2019, at 7:15 AM, Colin Law wrote: > > 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

Re: [Rails] Devise

2019-02-25 Thread Walter Lee Davis
What do the errors look like? When you say it doesn't work, what exactly are you seeing? Walter > On Feb 25, 2019, at 4:56 PM, David Merrick wrote: > > Hi Rob at the moment only the password reset email works. Are you able to > check them please? > > Password reset > > Hello <%=

Re: [Rails] What is the mysql equivalent to heroku pg:reset DATABASE?

2019-02-23 Thread Walter Lee Davis
gt; Thank you Walter. What if I am performing the task from a command line? > > On Saturday, February 23, 2019 at 7:21:36 PM UTC-5, Walter Lee Davis wrote: > You can use rake db:reset in your Rails root, with the correct RAILS_ENV= set > in the same line. Your database user (as configure

Re: [Rails] What is the mysql equivalent to heroku pg:reset DATABASE?

2019-02-23 Thread Walter Lee Davis
You can use rake db:reset in your Rails root, with the correct RAILS_ENV= set in the same line. Your database user (as configured in the database.yml file) will have to have the authority to drop the database. Walter > On Feb 23, 2019, at 6:18 PM, brainiacs...@gmail.com wrote: > > Hey

Re: [Rails] Gemfile with mysql

2019-02-18 Thread Walter Lee Davis
> On Feb 18, 2019, at 2:02 PM, brainiacs...@gmail.com wrote: > > Hey Everyone, > > I am updating a gemfile so it uses mysql rather than sqllite or progres. > Would someone advise me to what I need to swap out in the gemfile so this > happens flawlessly? One of the easiest ways to figure

Re: [Rails] Issue with connecting to oracle database

2019-02-12 Thread Walter Lee Davis
on server, then this question is probably best handled by your DBA. If you're using Oracle in production without hiring a DBA, you are probably going to have a very long road ahead of you. Walter > > On Tue, Feb 12, 2019, 7:42 PM Walter Lee Davis > > On Feb 12, 2019, at 5:53 AM, s

Re: [Rails] Issue with connecting to oracle database

2019-02-12 Thread Walter Lee Davis
> On Feb 12, 2019, at 5:53 AM, shashank tiwari wrote: > > irb(main):004:0> require 'ruby-oci8' > LoadError: Cannot find OCI.DLL in PATH. > from > C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/ruby-oci8-2.2.7-x64-mingw32/lib/oci8/check_load_error.rb:42:in > `check_os_specific_load_error' >

Re: [Rails] Adding uploaded pictures fro Heroku to AWS S3 Bucket

2019-02-07 Thread Walter Lee Davis
> On Feb 7, 2019, at 3:25 AM, David Merrick wrote: > > I'm not using carrier wave. I'm using paperclip. Yes, but the same rules apply (on the S3 side) for any attachment system. Walter > > On Thu, Feb 7, 2019 at 9:05 PM Ryan wrote: > Hi David, > > Check out this SO article that

Re: [Rails] gsub global operator

2019-02-05 Thread Walter Lee Davis
> On Feb 5, 2019, at 3:34 AM, fugee ohu wrote: > > Does gsub have a global operator? How do I gsub in cases where there are > multiple lines that need to be treated as a single string? What is the difference between sub() and gsub()?

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

2019-02-04 Thread Walter Lee Davis
> On Feb 4, 2019, at 12:27 PM, fugee ohu wrote: > > > > On Monday, February 4, 2019 at 8:10:33 AM UTC-5, Walter Lee Davis wrote: > > > On Feb 4, 2019, at 7:35 AM, fugee ohu wrote: > > > > > > > > On Sunday, February 3,

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

2019-02-04 Thread Walter Lee Davis
> On Feb 4, 2019, at 7:35 AM, fugee ohu wrote: > > > > On Sunday, February 3, 2019 at 9:54:25 PM UTC-5, Walter Lee Davis wrote: > > > On Feb 3, 2019, at 7:14 PM, fugee ohu wrote: > > > > > > > > On Wednesday, January 30, 2019 at 5:16:5

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

2019-02-03 Thread Walter Lee Davis
> On Feb 3, 2019, at 7:14 PM, fugee ohu wrote: > > > > On Wednesday, January 30, 2019 at 5:16:59 PM UTC-5, Colin Law wrote: > 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

Re: [Rails] update rails version from 2.x to 5.x in an existing very old rails application

2019-02-01 Thread Walter Lee Davis
> On Feb 1, 2019, at 3:17 AM, Phil Edelbrock wrote: > > >> On Feb 1, 2019, at 12:02 AM, Hasan Diwan wrote: >> >> To be safe, go through a stepwise upgrade, running and fixing your tests at >> each step. -- H >> >> >> On Thu, 31 Jan 2019 at 23:50, raj kumar <2017k...@gmail.com> wrote: >>

Re: [Rails] can i perform validations on an uploader mounted column

2019-01-31 Thread Walter Lee Davis
> On Jan 31, 2019, at 4:57 PM, fugee ohu wrote: > > > > On Thursday, January 31, 2019 at 4:38:52 PM UTC-5, Walter Lee Davis wrote: > > > On Jan 31, 2019, at 3:50 PM, fugee ohu wrote: > > > > I had to remove a validation on the :name column becaus

Re: [Rails] can i perform validations on an uploader mounted column

2019-01-31 Thread Walter Lee Davis
> On Jan 31, 2019, at 3:50 PM, fugee ohu wrote: > > I had to remove a validation on the :name column because my PictureUploader > which uses Carrierwave is mounted on that column > mount_uploader :name, PictureUploader > This causes validation > validates :name, presence: true > to cause

Re: [Rails] url slugs with special characters

2019-01-29 Thread Walter Lee Davis
> On Jan 29, 2019, at 9:55 PM, fugee ohu wrote: > > > > On Tuesday, January 29, 2019 at 8:31:18 AM UTC-5, Walter Lee Davis wrote: > > > On Jan 28, 2019, at 8:47 PM, fugee ohu wrote: > > > > > > > > On Monday, January 28, 2

Re: [Rails] url slugs with special characters

2019-01-29 Thread Walter Lee Davis
> On Jan 28, 2019, at 8:47 PM, fugee ohu wrote: > > > > On Monday, January 28, 2019 at 10:23:43 AM UTC-5, Walter Lee Davis wrote: > > > On Jan 27, 2019, at 8:34 PM, fugee ohu wrote: > > > > > > > > On Sunday, January 27,

Re: [Rails] How do I update someone else's fork?

2019-01-28 Thread Walter Lee Davis
Ask the submitter to pull master back into their branch, and push again. That will bring it back together, and will also put the burden of resolving any conflicts between their branch and the rest of the project. Walter > On Jan 28, 2019, at 5:59 PM, Jason Hsu wrote: > > I'm on the

Re: [Rails] AWS and hosting a Website

2019-01-28 Thread Walter Lee Davis
> On Jan 28, 2019, at 3:18 PM, David Merrick wrote: > > Yes I have EC2 instance but its on Cloud9 Aha. That's like having a cloud server for your development environment. That makes sense, then, that it would stop running when you stop working in its console. It's like spinning up rails

Re: [Rails] url slugs with special characters

2019-01-28 Thread Walter Lee Davis
> On Jan 27, 2019, at 8:34 PM, fugee ohu wrote: > > > > On Sunday, January 27, 2019 at 5:31:11 PM UTC-5, Walter Lee Davis wrote: > > > On Jan 27, 2019, at 5:01 PM, fugee ohu wrote: > > > > > > > > On Sunday, January 27,

Re: [Rails] url slugs with special characters

2019-01-27 Thread Walter Lee Davis
> On Jan 27, 2019, at 5:01 PM, fugee ohu wrote: > > > > On Sunday, January 27, 2019 at 4:47:48 PM UTC-5, Walter Lee Davis wrote: > > > On Jan 27, 2019, at 4:11 PM, fugee ohu wrote: > > > > > > > > On Sunday, January 27,

Re: [Rails] url slugs with special characters

2019-01-27 Thread Walter Lee Davis
> On Jan 27, 2019, at 4:11 PM, fugee ohu wrote: > > > > On Sunday, January 27, 2019 at 2:43:46 PM UTC-5, Walter Lee Davis wrote: > > > On Jan 27, 2019, at 7:35 AM, fugee ohu wrote: > > > > > > > > On Sunday, January 27, 2

Re: [Rails] url slugs with special characters

2019-01-27 Thread Walter Lee Davis
> On Jan 27, 2019, at 7:35 AM, fugee ohu wrote: > > > > On Sunday, January 27, 2019 at 12:24:25 AM UTC-5, Walter Lee Davis wrote: > > > On Jan 26, 2019, at 11:49 PM, fugee ohu wrote: > > > > > > > > On Saturday, January 26,

Re: [Rails] url slugs with special characters

2019-01-26 Thread Walter Lee Davis
> On Jan 26, 2019, at 11:49 PM, fugee ohu wrote: > > > > On Saturday, January 26, 2019 at 6:58:17 PM UTC-5, Walter Lee Davis wrote: > > > On Jan 26, 2019, at 5:27 PM, fugee ohu wrote: > > > > TypeError: no implicit conversion of Symbol into Integer

Re: [Rails] url slugs with special characters

2019-01-26 Thread Walter Lee Davis
> On Jan 26, 2019, at 5:27 PM, fugee ohu wrote: > > TypeError: no implicit conversion of Symbol into Integer > from app/models/press_release.rb:17:in `truncated_headline' > > > class PressRelease < ApplicationRecord > > extend FriendlyId > friendly_id :truncated_headline, use: :slugged

Re: [Rails] AWS and hosting a Website

2019-01-26 Thread Walter Lee Davis
> On Jan 26, 2019, at 2:28 PM, Hassan Schroeder > wrote: > > On Sat, Jan 26, 2019 at 11:20 AM David Merrick wrote: > >> I want a AWS Service that I can set up to run a Website with a Domain Name >> attached and keep it while I'm not logged into Amazon? > > Unless you want to plunge into

Re: [Rails] url slugs with special characters

2019-01-26 Thread Walter Lee Davis
> On Jan 26, 2019, at 1:57 PM, fugee ohu wrote: > > > > On Saturday, January 26, 2019 at 12:56:04 PM UTC-5, Walter Lee Davis wrote: > > > On Jan 26, 2019, at 5:27 AM, fugee ohu wrote: > > > > > > > > On Friday, January 25,

Re: [Rails] url slugs with special characters

2019-01-26 Thread Walter Lee Davis
> On Jan 26, 2019, at 5:27 AM, fugee ohu wrote: > > > > On Friday, January 25, 2019 at 9:06:22 AM UTC-5, Walter Lee Davis wrote: > > > On Jan 25, 2019, at 6:00 AM, fugee ohu wrote: > > > > I wanna convert my news stories to use slug urls based on the :

  1   2   3   4   5   6   7   8   9   10   >