[Rails] Re: Speed up Rails API to upload/load files using active storage

2019-09-18 Thread Frederick Cheung
On Wednesday, September 18, 2019 at 10:18:37 AM UTC+1, Murtaza Khan wrote: > I have an app build on ionic as front end and rails as back end, I use aws s3 > bucket for file uploading and digital ocean for production. Now the files > uploading/loading takes so much time as for instance if

[Rails] Re: why Marshal.dump a relation obejct would faile

2019-09-18 Thread Frederick Cheung
On Thursday, September 5, 2019 at 6:57:15 AM UTC+1, 李永博 wrote: > with a special scope Marhal.dump(result) wolud cause a faile > > Proc objects just can’t be dumped - this is a limitation of ruby. Fred > > > *** TypeError Exception: no _dump_data is defined for class Proc > > > ``` >

Re: [Rails] Rails Server not running on Cloud 9

2019-05-02 Thread Frederick Cheung
That error sounds a lot the one you get with earlier versions of rails 4.2.x that weren’t compatible with ruby 2.4. I’d try the most current version of rails 4.2.x (4.2.11.1). There shouldn’t be any feature differences between that and the version you already had, so if the tutorial you are

[Rails] how can i access locale files from rake task

2019-01-26 Thread Frederick Cheung
You should be able to do I18n.t(“...”) As an aside naming the task `test` may clash with the preexisting task of the same name. Fred -- 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

[Rails] Re: Wrong Rails(5.2.0) Version for Gemfile on RubyGems

2018-12-28 Thread Frederick Cheung
On Friday, December 28, 2018 at 12:39:28 PM UTC, leyla kapi wrote: > Hello everyone, > > > I try to upgrade rails version of my rails app from 5.0.7.1 to 5.2.0 .  > > > I copied from rubygems `gem 'rails', '~> 5.2'` then bundle, but I realized > that installed rails 5.2.2 version not 5.2.0 .

[Rails] Re: Swagger tools to use with Rails API

2018-12-08 Thread Frederick Cheung
On Tuesday, December 4, 2018 at 10:55:53 AM UTC, belgoros wrote: > Hi everyone ! Can anybdy advice or suggest to use a Swagger tool to use with > an existing Rails API app and to be compliant with Swagger v2 version? The > ones I found are: > - swagger-blocks > - rswag > - rspec-rails-swagger >

[Rails] Re: I need help installing RoR

2018-12-08 Thread Frederick Cheung
On Saturday, December 8, 2018 at 6:20:58 AM UTC, Herakles Downfall wrote: > I'm new to Ruby on Rails and tried installing RoR twice, but I keep running > into the same sqlite3 issue. I completely uninstalled RoR again and would > like some pointers on how to proceed because I don't know what I'm

[Rails] Re: Referencing named fixtures (is it possible?)

2018-09-23 Thread Frederick Cheung
On Sunday, September 23, 2018 at 5:20:41 PM UTC+1, strzi...@gmail.com wrote: > Hello all, > > I cannot seem to find a way how to reference named fixtures in cases where > Rails fixtures auto-id magic is not working. > > Imagine a model Message with attributes from and to as integers indicating

[Rails] Re: ruby clean up

2018-07-08 Thread Frederick Cheung
On Tuesday, July 3, 2018 at 5:36:22 PM UTC+2, Joe Guerra wrote: > I used homebrew to install ruby.   > > To remove old Homebrew formulae, see the cleanup section from https://docs.brew.sh/FAQ Fred > I guess I have to install rails on top of each version too.   > > On Tuesday, July 3, 2018

[Rails] Re: Unable to run migration scripts

2018-07-08 Thread Frederick Cheung
On Sunday, July 8, 2018 at 5:37:01 PM UTC+2, Joe Tseng wrote: > > I thought maybe it was because the version of RoR I had on Ubuntu (Ruby > 2.5.1/Rails 5.2.0) was different than that on Windows (v2.3.3/v5.1.4). I > explicitly locked my RoR versions to use what I had in Windows and then ran >

[Rails] Re: Model, after some time, decides it references a different (non-existent) table

2018-06-30 Thread Frederick Cheung
On Thursday, June 28, 2018 at 2:13:31 AM UTC+1, Phil wrote: > This is odd... I have a few models that after some time just start doing > SELECT "my_tablemy_belongs_to_table".* sort of thing. (Almost like it is > trying to reference a join table, but missing a _ between the table names.) > > In

[Rails] Re: Is it a good idea to avoid ERB usage, when it seems useless.

2018-06-27 Thread Frederick Cheung
On Tuesday, June 26, 2018 at 6:06:37 PM UTC+1, David Gautier wrote: > > I like ruby and I don't really link ERB templates ... > > > Why do we (Rails coders) write views as templates using ERB ... ? > Is it a go idea to write views using pure ruby ? > > > I'm not a massive fan of ERB, however it's

[Rails] Re: Renaming foreign key column causes forms to fail

2018-01-20 Thread Frederick Cheung
On Saturday, January 20, 2018 at 3:54:27 AM UTC, kenatsun wrote: > Using scaffold, I generated two models, Person and Offer, and the forms to > manage them.  Offer has a belong_to association with Person.  After running > the generator, all the forms immediately worked fine.  > > But then I

[Rails] Re: Unable to autoload constant issue

2018-01-19 Thread Frederick Cheung
On Friday, January 19, 2018 at 8:47:29 AM UTC, 정인중 wrote: >      Failure/Error: it { should validate_presence_of(:email) } > > >      LoadError: >        Unable to autoload constant USER, expected > /Users/injung/Github/api/app/models/user.rb to define it > Are there any references to USER

Re: [Rails] NewRelic replacement?

2017-12-04 Thread Frederick Cheung
I currently use appsignal, happy enough with that. It can also be worth talking to newrelic - when we last used them the deal they put us on was a fraction of what the publicly advertised price was. Fred On Tue, Nov 28, 2017 at 10:56 AM, Mugurel Chirica wrote: > I am

[Rails] Re: config.force_ssl = true problem

2017-09-18 Thread Frederick Cheung
On Monday, September 18, 2017 at 2:36:35 PM UTC+1, Ben Edwards wrote: > Hi.  My site has a certificate and if I go to https version it works fine.  > Problem is then I do 'config.force_ssl = true' I get an error, page does not > load and it complains redirect is to somewhere that will not load.

[Rails] Re: Dependencies

2017-09-08 Thread Frederick Cheung
On Thursday, September 7, 2017 at 2:13:46 AM UTC+1, Joe Guerra wrote: > > ok, a smaller jump to rails 4.2.8 compiled without any warnings. > > :) > > You do pretty much just have to read the messages. It's saying that it wants to use devise 3.5.6, which needs rails < 5 but that elsewhere in

[Rails] Re: Send HTML markup email with attachment

2017-09-08 Thread Frederick Cheung
On Wednesday, September 6, 2017 at 6:03:14 AM UTC+1, joel briggs wrote: > > > If I change the Mailer to add the content_type, the attached file becomes > a garbled string of text in the email but the HTML tags properly format the > text > > > > *Mailer* > > mail(to: email_params[:to], >

[Rails] Re: CSRF tokens to not match what is in session (Rails 4.1)

2017-07-27 Thread Frederick Cheung
On Wednesday, July 26, 2017 at 3:24:19 PM UTC+1, Jason FB wrote: > > The exception we see is simply ActionController::InvalidAuthenticityToken on > normal logins to our website. Upon careful examination of the  > authenticity_token sent by the form and the session's _csrf_token (we are > using

[Rails] Re: Email incoming in Action Mailer

2017-07-23 Thread Frederick Cheung
use your gmail address then you have to use something like the gem you found - the services I mention require you to have control over the whole domain. You should change your password though, since you've just posted it on the internet. Fred > On Sunday, July 23, 2017 at 4:41:11 PM UTC+5,

[Rails] Re: Email incoming in Action Mailer

2017-07-23 Thread Frederick Cheung
On Saturday, July 22, 2017 at 3:55:48 PM UTC+1, Aqib Hameed wrote: > }I tried to run the command rails runner 'UserMailer.receive(STDIN.read)' > > But nothing happened even the email is incoming .It does not call the receive  > method > Where should i call the receive method ??? How determine

[Rails] Re: Help with gestalt of Pundit's authorize, please

2017-07-18 Thread Frederick Cheung
> > >> On Monday, July 17, 2017 at 1:08:08 PM UTC+1, Ralph Shnelvar wrote: > > While I'm at it ... > > In > > authorize(@post) > > WHAT is being "authorize-d"? The @post ? The current_user ? The > controller action ? Something else ? > > All 3: this checks that the current user can perform a

[Rails] Re: Help with gestalt of Pundit's authorize, please

2017-07-18 Thread Frederick Cheung
On Monday, July 17, 2017 at 8:02:11 AM UTC+1, Ralph Shnelvar wrote: > > > authorize(@post) > means ... > > For the current user (i.e. current_user) and > for the @post object > throw a NotAuthorizedError exception if PostPolicy#create? returns false > > > > I think the "hidden" inputs to

[Rails] Re: "output" name collission with RSpec::Matchers::BuiltIn::Output

2017-07-18 Thread Frederick Cheung
On Sunday, July 16, 2017 at 6:17:56 PM UTC+1, Ralph Shnelvar wrote: I suspect I have a name collision with *Class: > RSpec::Matchers::BuiltIn::Output* > > but > I'm damned if I can figure out why. >

[Rails] Re: Rspec: expect(response).to have one of several valid values

2017-07-18 Thread Frederick Cheung
On Sunday, July 16, 2017 at 1:43:01 AM UTC+1, Ralph Shnelvar wrote: > > > expect(response).to (have_http_status(200) || have_http_status(302)) > > While syntactically valid, this doesn't work because > have_http_status(200)will > throw an exception before it gets to the have_http_status(302) .

Re: [Rails] Best place to store secret keys in Rails

2017-07-18 Thread Frederick Cheung
On Monday, July 17, 2017 at 10:33:04 PM UTC+1, Walter Lee Davis wrote: > > > > On Jul 17, 2017, at 3:26 PM, Ralph Shnelvar wrote: > > My Rails app is on my own server, then > > > > Does it make a difference if the secret keys are in environment > variables or

[Rails] Re: Rspec. Is 302 a success? Why 302?

2017-07-15 Thread Frederick Cheung
On Friday, July 14, 2017 at 6:02:38 PM UTC+1, Ralph Shnelvar wrote: > I have the following code, which was automagically created, in > ~/controllers/articles_controller_spec.rb > > >   describe "GET #new" do >     it "returns a success response" do >       # See Hassan's answer in >       #  

[Rails] Re: Rspec. assert_select deprecated?

2017-07-14 Thread Frederick Cheung
dom-testing gem, so I would start with https://github.com/rails/rails-dom-testing/blob/master/README.md Fred > If it isn't apparent, Fred, thank you. > > Ralph > > > > On Friday, July 14, 2017 at 5:15:04 AM UTC-6, Frederick Cheung wrote: > > On Friday, July 14, 2017

[Rails] Re: Rspec. assert_select deprecated?

2017-07-14 Thread Frederick Cheung
On Friday, July 14, 2017 at 9:58:56 AM UTC+1, Ralph Shnelvar wrote: > > So is it deprecated? What's it replaced by? Where can I find > documentation? > > apidock things things are deprecated when they move - it doesn't know it was extracted into the rails-dom-testing gem > I find no

[Rails] Re: Class variables and Rails ... how global? When initialized? Thread safety?

2017-07-14 Thread Frederick Cheung
On Friday, July 14, 2017 at 9:40:56 AM UTC+1, Ralph Shnelvar wrote: > > > > > In > class User < ActiveRecord::Base > def self.any_users? >@any_users ||= exists? > end > end > > So at some point in the code, I call > User.any_users; > So Ruby says "Ok, @any_users isn't defined so I'm going

Re: [Rails] Ruby on Rails Talk: Moderated?

2017-07-11 Thread Frederick Cheung
On Wednesday, July 5, 2017 at 12:39:29 PM UTC+1, Walter Lee Davis wrote: > > Not that I'm aware of. What was the subject line of your topic? Did you > post by mail or using the Google Groups Web interface? > > New users are moderated - just a spam thing really. Thereafter you're "approved" and

[Rails] Re: Rspec failure with :get. :get documentation?

2017-07-10 Thread Frederick Cheung
On Sunday, July 9, 2017 at 9:55:30 AM UTC+1, Ralph Shnelvar wrote: > > > Questions: > > 1) Does the message "wrong number of arguments (given 2, expected 1)" refer > to get? > Yes > > 2) Where can I find documentation on get? I would start here:

Re: [Rails] I got error xmlrpc-0.3.0 requires ruby version >= 2.3

2017-05-01 Thread Frederick Cheung
On Monday, May 1, 2017 at 5:42:22 PM UTC+1, Simon Fisher wrote: > Hi Edsil, I have the same issue as Edsil and it is because of the Ruby > version running on Heroku. Curious thing is that xmlrpc-0.3.0 is not a gem in > my gemfile (pasted below) so I'm not sure how to downgrade the gem and I >

[Rails] Re: Upgrade an app from rails 4.2 to 5

2017-04-18 Thread Frederick Cheung
On Tuesday, April 18, 2017 at 9:34:49 PM UTC+1, João Bordalo wrote: > Hi there, > > > I'm trying to update a ruby on rails app from 4.2 to 5.0 version. > > > I'm following this guide  > https://hashrocket.com/blog/posts/how-to-upgrade-to-rails-5 and when i run $ > bundle update rails I have

Re: [Rails] Where to meet the Rails community?

2017-04-09 Thread Frederick Cheung
On Sunday, April 9, 2017 at 2:21:55 AM UTC+1, Hassan Schroeder wrote: > On Thu, Apr 6, 2017 at 1:14 AM, 'Elmar Hinz' via Ruby on Rails: Talk > wrote: > > > I find a few postings per day. Is that all? Can't be! Is Rails dead? > > Not at all. But it's a fairly

[Rails] Re: File System Monitoring in Rails 5

2017-03-13 Thread Frederick Cheung
On Monday, March 13, 2017 at 7:29:03 AM UTC, amree wrote: > Hi > > > When we started rails server with Rails 5, we'll start fsevent_watch to watch > for changes in our application directory. My questions are: > > > * Why are we also watching for the locale directory for the loaded gems? I

[Rails] Re: are admins also users?

2017-02-23 Thread Frederick Cheung
On Wednesday, February 22, 2017 at 6:19:18 PM UTC, Mike wrote: > > If you have a robust permissions system, you can also hide or show fields > based on those permissions > > In short I would never use an 'admin' model there is simply no point for > 99% of applications > I've had a different

[Rails] Re: Accessing another model's attributes

2017-02-13 Thread Frederick Cheung
On Sunday, February 12, 2017 at 11:29:26 AM UTC, Aida Delic wrote: > > > scope :department, -> (department) { where('department == ?', department) } > scope :year, -> (year) { where('subject.year == ?', year) } > > Then I called these methods in exams controller (index action) and passed >

[Rails] Re: How to Patch the Console?

2017-02-06 Thread Frederick Cheung
On Monday, February 6, 2017 at 9:41:49 AM UTC, hartmut bischoff wrote: > > Hi everbody, > > I am working on a Rails Project using OrientDB as Database ( > https://github.com/topofocus/active-orient ) > This gem initializes any available database-class and assigns it to > model-classes. > > For

[Rails] Re: rvm install fails with configure: error: cannot run C compiled programs

2016-12-22 Thread Frederick Cheung
On Saturday, December 17, 2016 at 10:32:27 PM UTC, fugee ohu wrote: > > checking whether we are cross compiling... configure: error: in > /home/myusername/.rvm/src/ruby-2.3.3': > configure: error: cannot run C compiled programs. If you meant to cross > compile, use--host'. > > See `config.log'

[Rails] Re: Any suggestions for promoting a new gem prototype for feedback?

2016-12-13 Thread Frederick Cheung
On Tuesday, December 13, 2016 at 9:42:04 PM UTC, Tim Edwards wrote: > I've just prototyped a new gem and looking for suggestion of how to let > people know it exists so that I can get feedback. I've posted within Ruby on > Rails on Ruby-Forum.com and am soliciting advice on the #ruby and >

Re: [Rails] Re: Consolidated logging

2016-12-04 Thread Frederick Cheung
On Thursday, November 24, 2016 at 8:25:05 PM UTC, Hassan Schroeder wrote: > > On Thu, Nov 24, 2016 at 2:20 AM, Frederick Cheung > <frederick.che...@gmail.com> wrote: > > > If you're on aws, then aws cloudwatch has a logs feature these days. It > can > > do

[Rails] Re: Caching and .includes()

2016-12-04 Thread Frederick Cheung
On Sunday, December 4, 2016 at 9:00:04 PM UTC, Brian Christian wrote: > > > Okay, so my issue here is: > > If the cache key is just based on the Posts, then the controller code will > pull the Authors association for no reason (we don’t actually need it, > because the author names are cached

[Rails] Re: Consolidated logging

2016-11-24 Thread Frederick Cheung
On Tuesday, November 22, 2016 at 5:35:32 PM UTC, Hassan Schroeder wrote: > > I'm looking for recommendations on consolidating Rails logs from > multiple servers[*] into one. > > [*] AWS EC2 instances running Ubuntu 16.04 + Ruby 2.3.x/Rails 5 > > Bonus points for workable integration with

[Rails] Re: How to post to multiple job boards from my job board - Ruby on Rails

2016-09-19 Thread Frederick Cheung
On Saturday, September 17, 2016 at 9:49:32 PM UTC+1, Olaoluwa Afolabi wrote: > > I like to post to some selected free job boards what a job advert is made > on my ruby on rails job board. How can I factor this or is there any gem > that handles that? Here is the full detail to my question on

[Rails] Re: Rails SQL query counts results when not asked

2016-08-25 Thread Frederick Cheung
On Wednesday, August 24, 2016 at 1:49:48 PM UTC+1, Bazley wrote: > > The first thing I do with it is this: > > if @new_relationships.any? > > So it looks like .any? affects the query? I would have thought rails would > perform the query, get all the records into @new_relationships, and then >

[Rails] Re: Rails SQL query counts results when not asked

2016-08-24 Thread Frederick Cheung
On Wednesday, August 24, 2016 at 1:11:42 PM UTC+1, Bazley wrote: > > This rails/sql code... > > @new_relationships = User.select('*') > .from("(#{@rels_unordered.to_sql}) AS > rels_unordered") > .joins(" >

[Rails] Re: Rails 5: How to send and process large files (200Mb) via Rails API?

2016-07-31 Thread Frederick Cheung
On Sunday, July 31, 2016 at 4:50:23 PM UTC+1, Tomasz Antas wrote: > I'm looking for the general concept, but every tip can be useful. The client > (mobile) has to send a large file to Rails API. It's a some text file with > raw data. > How can the Rails API get the large file from client? Should

[Rails] Re: Why cannot read activation_digest?

2016-07-19 Thread Frederick Cheung
On Tuesday, July 19, 2016 at 9:42:53 AM UTC+1, Vaclav Prokop wrote: > > Hi, > I am excersising RailsTutorial and do not understand why I cannot read > user's activation_digest although I defined attr_reader for it as such: > > attr_reader :activation_digest > > This replaces the active record

[Rails] Re: Safer "fuzzy" find -- how would you do this?

2016-07-12 Thread Frederick Cheung
On Sunday, July 10, 2016 at 4:28:39 PM UTC+1, Walter Lee Davis wrote: > > I was just looking over some code I wrote last year, and found this in one > of my mailers: > > @item = eval(params[:item].classify).send(:find, params[:item_id]) > > The idea here is that I can have the mailer

[Rails] Re: Deploying to Heroku, elasticsearch problems.

2016-07-06 Thread Frederick Cheung
On Monday, July 4, 2016 at 6:50:35 PM UTC+1, Ruby-Forum.com User wrote: > > > Then I had to reindex the DB and migrate to Heroku. Just to see if it > would work I copied that code directly from an answer on Stack Overflow > but now I'm wondering about the AWS url in the if statement, because

[Rails] Re: Deploying to Heroku, elasticsearch problems.

2016-06-30 Thread Frederick Cheung
On Thursday, June 30, 2016 at 11:06:48 AM UTC+1, Ruby-Forum.com User wrote: > Hey sorry I have been busy and up until your post I did not have a > public repo however now I do: > > https://github.com/tfantina/ratings > > I've tried to clean it up nicely (when it was private it was a little >

[Rails] Re: I'm new to ruby rail and i keep getting the same error code.

2016-06-10 Thread Frederick Cheung
On Friday, June 10, 2016 at 4:45:13 PM UTC+1, Rodin Chery wrote: > > I'm trying to run "rails server" but I keep getting a missing gem so > every gem it said was missing I manually installed. I manually installed > gems all the way up to this point but this gem error won't go away. > >

[Rails] Re: I need a RoR/Ruby chat with community.

2016-06-07 Thread Frederick Cheung
On Monday, June 6, 2016 at 5:26:34 PM UTC+1, Pavel Sh wrote: > > Hi guys, I'm trying to find a chat with RoR developers. > Something like this: https://telegram.me/rubylang > Can you recommend me any chats with a big Ruby/RoR community? Do they > exist? > Or, as alternative, can you recommend

[Rails] Re: Serialized attributed with native hash is saved as !ruby/hash:ActiveSupport::HashWithIndifferentAcce

2016-05-24 Thread Frederick Cheung
On Monday, May 23, 2016 at 1:12:33 PM UTC+1, Alessio Varalta wrote: > > If i put in the model > > > serialize :birthplace, Hash > > > is correct but i have a diffrent format {:it=>"Padova",:de=>"Padovan"} > > > I read in the last part of this document > > >

[Rails] Re: Changing primary key

2016-05-19 Thread Frederick Cheung
On Thursday, May 19, 2016 at 11:21:50 AM UTC+1, Ruby-Forum.com User wrote: > > when I try to render a collection of comments associated with a status > like so: > > <%= render @comments %> > > I get this error: > > PG::UndefinedColumn: ERROR: column comments.status_id does not exist > LINE

[Rails] Re: ActiveRecord date field

2016-05-05 Thread Frederick Cheung
On Thursday, May 5, 2016 at 4:26:19 PM UTC+1, Ruby-Forum.com User wrote: > > By accident, I just realized that an ActiveRecord date field can be set > using a third way... > > foo = Fo.new > foo.start_date = Date.new(2016, 1, 31) > foo.start_date = '2016-01-31' > > and to my surprise... >

[Rails] Re: nested_attributes in Form Helper - what is the "Rails way"?

2016-04-20 Thread Frederick Cheung
and which deleted? Assigning to category_ids will create/delete rows in the join table as appropriate. Fred. > > Thanks, > Piotr >   > > > W dniu wtorek, 19 kwietnia 2016 17:19:21 UTC+2 użytkownik Frederick Cheung > napisał: > > > > > As long a

[Rails] Re: nested_attributes in Form Helper - what is the "Rails way"?

2016-04-19 Thread Frederick Cheung
On Tuesday, April 19, 2016 at 4:09:21 PM UTC+1, Piotr Brych wrote: > > We are working with nested attributes and we've reached a point where > we're not sure if there is a better, clearer, "more rails" way of dealing > with it. > > We have 3 models - Organisation, Category and a strictly join

[Rails] Re: How to Asset Pre-compile for Production operation? - Rails 4.2.5

2016-04-15 Thread Frederick Cheung
On Friday, April 15, 2016 at 10:03:20 AM UTC+1, MCL wrote: > > > But in reviewing the postings here, I found this: "rake > assets:precompile". Ah. I ran this, and got what looked like good > results. > It returned the asset file names, with their MD5 hash strings, and > indicated they are

[Rails] Re: problem with mass asignment

2016-01-26 Thread Frederick Cheung
On Tuesday, January 26, 2016 at 8:21:21 PM UTC, Ruby-Forum.com User wrote: > > Hi everyone. I'm new in ruby and recently faced with mass assignment > problem. Below I attached a sample code similar to mine. Could you > explain me what should I use in require method??? is it a name of >

[Rails] Re: Rails + Passenger on Heroku: set expiry date or a maximum age in the HTTP headers for static assets

2016-01-14 Thread Frederick Cheung
On Thursday, January 14, 2016 at 11:49:31 AM UTC, Amr Noman wrote: > > I'm using Rails api with an angularjs front-end which is served simply as > static files under public directory (no sprockets or rails assets > pipeline involved). > > I've chosen passenger as the app server, deployed to

[Rails] Re: Polymorphic join table not loading with includes

2016-01-13 Thread Frederick Cheung
On Wednesday, January 13, 2016 at 9:59:34 PM UTC, Flemming Thesbjerg wrote: > > > I am trying to optimize a slow query with an includes statement. > > > But a join table with a polymorphic association seem to be preventing it. > > > The following gist tries to illustrate the issue: >

[Rails] Re: Div background image not showing in heroku. However, the logo shows

2016-01-08 Thread Frederick Cheung
On Friday, January 8, 2016 at 4:15:15 AM UTC, Ruby-Forum.com User wrote: > > I tried changing the image tag, no luck with that. I reviewed other post > here and tried those solutions none work. I also use amazon cloudfront. > > Assuming your image is in app/assets/images, read up on the asset

[Rails] Re: ActionController::RoutingError: No route matches [CONNECT] "/"

2015-12-31 Thread Frederick Cheung
filtering requests based on http method. Fred > On Tuesday, 29 December 2015 21:29:00 UTC+2, Frederick Cheung wrote:On > Tuesday, December 29, 2015 at 6:13:52 PM UTC, Torsten Rüger wrote: > > > Hi, > > > > > > > > > i've been getting the subject err

Re: [Rails] Why the first user created would get id 2 instead of 1?

2015-12-31 Thread Frederick Cheung
On Wednesday, December 30, 2015 at 10:30:40 PM UTC, James Jelinek wrote: > Sandbox won't persist data. It'll do a transactional rollback. It never > really persists data.  > > As I said earlier, rolling back transactions doesn't reset sequences on Postgres (

[Rails] Re: ActionController::RoutingError: No route matches [CONNECT] "/"

2015-12-29 Thread Frederick Cheung
On Tuesday, December 29, 2015 at 6:13:52 PM UTC, Torsten Rüger wrote: > Hi, > > > i've been getting the subject error for some while in production.  > I've tried to find out what that connect even means with little avail.  > But i was generally surprised how much hacking attempts are being made,

Re: [Rails] Why the first user created would get id 2 instead of 1?

2015-12-29 Thread Frederick Cheung
On Sunday, December 27, 2015 at 6:17:17 PM UTC, Hassan Schroeder wrote: > On Sun, Dec 27, 2015 at 1:29 AM, 'krfg' via Ruby on Rails: Talk > wrote: > > > I did not delete any user, at very least not after creating the user that > > received id 2. > > Creating

[Rails] Re: Using API's on Rails (Is Java script necessary?)

2015-12-29 Thread Frederick Cheung
On Tuesday, December 29, 2015 at 1:38:14 PM UTC, Nojin Park wrote: > > Hi all, > > I've started learning Ruby and I'm still learning the basics. > My goal is to create web applications using rails and multiple API's (API > mashup.. Google, FB, Twitter,etc...) > > I see most people coding in

[Rails] Re: Avoid assets disappearing on you

2015-12-15 Thread Frederick Cheung
On Tuesday, December 15, 2015 at 6:57:36 AM UTC, Fernando Cordeiro wrote: > > The Asset Pipeline is amazing and I'm all for opinionated solutions, but I'm > all for solutions, and the decision to not use querystrings, albeit > respectable in the sense it leverages proxies, creates a problem

[Rails] Re: explanation of polymorphic in rails

2015-12-14 Thread Frederick Cheung
On Monday, December 14, 2015 at 1:43:08 AM UTC, Oto Iashvili wrote: > Hi, > Does someone know rails polymorphic very well and can explain me how I can do > something similar than polymorphic and change dynamically the table name for > a polymorphic attribute. > I know already that normally you

[Rails] Re: migration and git

2015-12-05 Thread Frederick Cheung
On Saturday, December 5, 2015 at 1:11:54 PM UTC, Martin wrote: > - merging master to branch a because of this important changes, so a is ahead > of master not just a fork. > - now I put a copy of the production database to the development database > > of course now the migration first created

[Rails] Re: Faild to build RMagick

2015-12-05 Thread Frederick Cheung
On Friday, December 4, 2015 at 3:47:50 PM UTC, Ruby-Forum.com User wrote: > I don't understand what is "Development tool" about the phrase: > ... "You have to install development tools first" ... > It'a about XCode or about a particular missing Libray? > It's a slightly generic message. The

Re: [Rails] Re: Developing WITHOUT Vagrant/VirtualBox

2015-12-03 Thread Frederick Cheung
On Wednesday, December 2, 2015 at 10:00:48 PM UTC, Colin Law wrote: > > On 2 December 2015 at 21:46, Frederick Cheung > <frederick.che...@gmail.com> wrote: > > On Wednesday, December 2, 2015 at 5:46:49 PM UTC, Jason Hsu, Ruby on > High Speed Rails wrote: > >>

Re: [Rails] Re: Developing WITHOUT Vagrant/VirtualBox

2015-12-03 Thread Frederick Cheung
On Thursday, December 3, 2015 at 11:09:56 AM UTC, Colin Law wrote: > > >> >> That said, I'd like to hear from those of you who are still part of > the > >> >> vast majority who use Ruby on Rails directly on the host OS. How do > you > >> >> deal with the issues that prompted me to use

Re: [Rails] Re: Developing WITHOUT Vagrant/VirtualBox

2015-12-03 Thread Frederick Cheung
On Thursday, December 3, 2015 at 2:14:17 PM UTC, Colin Law wrote: > > > I thought I knew why I use gemsets (I have a different one for each > combination of ruby/rails, major rails version that is, that I use, so > 1.8.7@rails_2.3, 2.0.0@rails_4.2 etc) but I am not so sure now that it > is

[Rails] Re: Developing WITHOUT Vagrant/VirtualBox

2015-12-02 Thread Frederick Cheung
On Wednesday, December 2, 2015 at 5:46:49 PM UTC, Jason Hsu, Ruby on High Speed Rails wrote: > > > That said, I'd like to hear from those of you who are still part of the vast > majority who use Ruby on Rails directly on the host OS.  How do you deal with > the issues that prompted me to use

[Rails] Re: Some tracing guideance appreciated to understand how Ruby registers javascript in Rails

2015-11-30 Thread Frederick Cheung
On Sunday, November 29, 2015 at 4:09:04 PM UTC, dave wrote: > > Fred >> > > Hi Fred, > Thank you for your response and explanation: development vs production > javascript tags. Yes I also set traces into sprockets and manifest.rb code > before my original post. > Where the tracing falls down

[Rails] Re: Some tracing guideance appreciated to understand how Ruby registers javascript in Rails

2015-11-28 Thread Frederick Cheung
On Saturday, November 28, 2015 at 7:38:17 PM UTC, dave wrote: > Hi Group, > I'm trying to see how Rails at ``startup time'' creates  Javascripts within > the Clientside of the browser. > > rails s #starting my program > > I've used both Byebug within Ruby code and Firefoxe's debugger

[Rails] Re: Zombie Issue With email Link

2015-11-25 Thread Frederick Cheung
On Wednesday, November 25, 2015 at 12:36:46 PM UTC, Ruby-Forum.com User wrote: > > Hi All, > > I am generate base64 link with some params, that link send to user > email, it's worked fine. > > > Not sure what your question is, but the stack trace in your attachment refer to code other than

[Rails] Re: bug in fiddle or something I did is wrong?

2015-11-23 Thread Frederick Cheung
On Monday, November 23, 2015 at 3:25:07 PM UTC, Liz Huang wrote: > > > > Thanks! > > Strange that I am able to get error message before just using char *, > thought > it meant passing string by pointer already. > > it does, but if you want to allocate a new buffer and have the caller access that

[Rails] Re: bug in fiddle or something I did is wrong?

2015-11-20 Thread Frederick Cheung
On Friday, November 20, 2015 at 5:34:33 PM UTC, Liz Huang wrote: > Hi, > > I am trying to use Fiddle to call C function in dynamic library, I used to be > able to > pass a return long variable and an error message, but now only return long > variable > is returned, can't get the error message,

[Rails] Re: Reference chek-up

2015-11-19 Thread Frederick Cheung
On Thursday, November 19, 2015 at 8:12:45 AM UTC, Hristina Gvozdenovic wrote: > Hi everyone !  > > > I am a complete (complete) beginner in Ruby with no prior experience in > programming at all.  > We need to do a certain project in for my transdisciplinary course at > university, and it

[Rails] Re: Call API using curl in seed.rb

2015-11-18 Thread Frederick Cheung
On Tuesday, November 17, 2015 at 3:14:33 PM UTC, daynthan kabilan wrote: > > Hi, > > I need to call API using curl in seed.rb > > Before i have used API like > > response = HTTParty.get(" > https://pipeline.locallabs.com/api/v1/organizations?access_key=XX;) > > i don't know how to call API

[Rails] Re: Datepicker in nested form

2015-11-15 Thread Frederick Cheung
On Monday, November 16, 2015 at 6:59:01 AM UTC, Derlis Gonzalez wrote: > Hello, I can not configure datepicker with nested form. Help me please. Why not? What precisely isn't working? Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: Script Relocator: Anything wrong with this?

2015-11-11 Thread Frederick Cheung
On Wednesday, November 11, 2015 at 10:38:22 AM UTC, Uwe Kubosch wrote: > > Hi! > > For a faster initial render of my pages, I have added a script relocator > initializer that scans the page and moves all script tags to the bottom > of the body tag. Order is kept, and the script tags in the

[Rails] Re: ActiveRecord Migration Peev- Freedom to run app while migrations are pending

2015-11-11 Thread Frederick Cheung
On Thursday, November 12, 2015 at 6:57:56 AM UTC, Amit Mhatre wrote: > I was wondering if there should be a way to  run the app even if some > migrations are pending. Lets say I have created a migration...but at this > time I am not sure if I want to run it as is am anticipating >

Re: [Rails] one liner with rescue is good style ?

2015-11-06 Thread Frederick Cheung
On Friday, November 6, 2015 at 9:32:21 AM UTC, Marco Antonio Almeida wrote: > > If you're using Rails, another approach is to use try ( > http://apidock.com/rails/Object/try). > > def rqstate > quote_request.try(:status) || "unsubmitted" > end > > #try is very nice in this case, but avoid

[Rails] Re: [Help] Need help with first_or_create. Never finds existing Record

2015-11-02 Thread Frederick Cheung
On Friday, October 30, 2015 at 9:40:08 PM UTC, Ruby-Forum.com User wrote: > > I have a problem with a form that either updates or creates depending on > whether the "project" exists already. > > How do you want to determine whether the project exists or not? > Im using the def create > >

[Rails] Re: reject_if not working

2015-10-29 Thread Frederick Cheung
On Thursday, October 29, 2015 at 6:59:09 AM UTC, Eduardo Campestrini wrote: > > def reject_contact(attributes) > attributes['phone'].blank? > attributes['website'].blank? > end > > This doesn't do what you want - it's return value depends solely on the blankness of the website

[Rails] Re: How Do I Re-Open an App in the Terminal, When I Restart Rails

2015-10-22 Thread Frederick Cheung
On Thursday, October 22, 2015 at 4:10:46 PM UTC+1, Darren Brett King wrote: > > Hi everyone, > > I have a question, that I can't seem to find an answer for anywhere. I > might be missing something obvious, but the best way to find out is to ask. > So, when I re-open Rails, and I want to go

[Rails] Re: Reloading page in $.post 'done' callback not working

2015-10-21 Thread Frederick Cheung
On Wednesday, October 21, 2015 at 7:11:05 AM UTC+1, Dave Ekhaus wrote: > > Hi All. > > > Within the 'success' callback of a $.post call - I'm trying to reload the > current page (here's a pastie -> http://pastie.org/10496733) > > > My 'post' call works and now I'd like to refresh the page.

Re: [Rails] Re: The Basics of Creating Rails Plugins

2015-10-21 Thread Frederick Cheung
On Monday, October 19, 2015 at 4:15:38 PM UTC+1, Colin Law wrote: > > On 19 October 2015 at 16:04, Frederick Cheung > <frederick.che...@gmail.com> wrote: > > > > > > On Monday, October 19, 2015 at 3:27:52 PM UTC+1, Bharat Manghnani wrote: > >> &

[Rails] Re: The Basics of Creating Rails Plugins

2015-10-19 Thread Frederick Cheung
On Monday, October 19, 2015 at 3:27:52 PM UTC+1, Bharat Manghnani wrote: > > Ruby on Rails is really powerful but eventually you may find Ruby lacking > a particular functionality or wishing for a particular feature in course of > your work. After all, no programming language is perfect and

[Rails] Re: Having some problems getting my params to pass. Any help would be super appreciated..

2015-10-14 Thread Frederick Cheung
On Tuesday, October 13, 2015 at 9:46:28 PM UTC+1, Prkl8r wrote: > > > def invite_params > params.require(:attended_event_id => params[:event_selected], :attendee_id => > params[:user_ids].first ) > end > > This is completely wrong. This usually looks something like

[Rails] Re: Running a Ruby Script from Rails controller kills the rails server

2015-10-13 Thread Frederick Cheung
On Tuesday, October 13, 2015 at 12:56:28 PM UTC+1, Sam S wrote: > > Inside the controller the ruby script is run with the **exec** command. > > script_exec = exec("ruby > /Code/AttendanceReport/attn/bin/scripts/Spreadsheet_proper.rb '#{city}' > '#{date1}' '#{date2}'") > > > exec

Re: [Rails] ActiveRecordAssociation

2015-10-07 Thread Frederick Cheung
On Wednesday, October 7, 2015 at 8:32:58 AM UTC+1, Colin Law wrote: > > On 7 October 2015 at 00:26, peter williams wrote: > > It seems that section has been removed from the latest guides, I don't > know why. Anyone know whether it was removed for a good reason? > > It

[Rails] Re: Reset password token is invalid OR Reset password token has expired, please request a new one

2015-10-02 Thread Frederick Cheung
On Friday, October 2, 2015 at 1:53:50 PM UTC+1, der_tom wrote: > > im lost in an update. updated rails 3 to 4 and now stuck with devise... > > i have updated views and controller code & user.rb, but i dont know where > the error comes from...nor do i see the same reset token in the database...

[Rails] Re: Gem dependency issue

2015-09-29 Thread Frederick Cheung
On Monday, September 28, 2015 at 10:01:22 PM UTC+1, Colin Law wrote: > > Any suggestions as to why I have to explicitly include gon in the > application's Gemfile, when it is included anyway via the dependency > in my gem? > Bundler's autorequire feature only requires gems listed in the

[Rails] Re: Devise authentication, signin loop

2015-09-23 Thread Frederick Cheung
On Wednesday, September 23, 2015 at 9:51:22 AM UTC+1, Shabeer Hasan wrote: > > Hello, i am new to rails, i am starting an app with devise for > authentication, but when i add the line > before_action :authenticate_user! > in the ApplicationContoller, when we login it just keeps landing on the

  1   2   3   4   5   6   7   8   9   10   >