[Rails] How do I implement MailCatcher under the docker-compose way?

2020-03-16 Thread Jason Hsu
The app in question is at https://github.com/jhsu802701/railn-20200316-215223-398 . Note that config/environments/development.rb is configured for MailCatcher. I've been able to use MailCatcher without docker-compose, but I can't quite figure out how to get it to work in a Rails app that revol

[Rails] Fully Dockerized Rails apps

2019-11-21 Thread Jason Hsu
Can any of you point me to examples of Rails apps that are fully Dockerized? I'd like to look at as many examples as possible for a good reference on how to Dockerize Rails projects that I'm on. An example is https://github.com/codebar/planner . Sadly, not all apps with a Dockerfile and a dock

Re: [Rails] Re: How do you run the test suite with docker-compose in a Dockerized Rails app?

2019-10-31 Thread Jason Hsu
Thanks, Walther, on the suggestion of adding a docker container specifically dedicated to running tests. (I personally don't agree with the use of Guard, so I'd just run the shell and then enter the test commands when necessary.) Why isn't this normally done? But exactly what is the docker-co

Re: [Rails] Re: How do you run the test suite with docker-compose in a Dockerized Rails app?

2019-10-30 Thread Jason Hsu
Yes. However, I use just one Docker container that contains everything I need, including Ruby, Rails, Node.js, PostgreSQL, Redis, etc. I know that my way is crude, but it works. I can't move on to the docker-compose way of doing things until I figure out all the issues that are stopping me.

Re: [Rails] Re: How do you run the test suite with docker-compose in a Dockerized Rails app?

2019-10-30 Thread Jason Hsu
I thought that would work, but simplecov isn't loading. On Wednesday, October 30, 2019 at 10:53:06 AM UTC-5, Brandon McClelland wrote: > > You would do something like this (found at > https://blog.codeship.com/testing-rails-application-docker/ after > googling "running rails test with docker-c

[Rails] Re: How do you run the test suite with docker-compose in a Dockerized Rails app?

2019-10-30 Thread Jason Hsu
What's the full command for running the test suite? Sadly, but this isn't a CS class that one can BS through with partial credit. On Wednesday, October 30, 2019 at 7:25:06 AM UTC-5, San Ji wrote: > > docker-compose run? > > https://docs.docker.com/compose/reference/run/ > -- You received this

[Rails] How do you run the test suite with docker-compose in a Dockerized Rails app?

2019-10-29 Thread Jason Hsu
I've contributed to the Octobox app (https://github.com/octobox/octobox). I've been using a weird system of using Docker. Instead of using it the normal way, I create my own custom Docker image for each Rails project that I'm on. When I log into my custom Docker container, I basically follow

[Rails] Rails 5.2 Custom Credentials — generally accepted way to segregate environments?

2019-06-09 Thread Jason Fleetwood-Boldt
age-credentials-for-different-environments-in-rails-5-2 any tip appreciated. Thanks, Jason -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrail

[Rails] Working on the rubygems.org web site

2019-04-01 Thread Jason Hsu
Do any of you work on the rubygems.org web site? The repository URL is at https://github.com/rubygems/rubygems.org . I'm able to get all but THREE tests to pass. All of these tests fail with the message "Failed to open TCP connection to localhost:1". I've described my dilemma in more det

[Rails] Is there a way to replicate the Travis CI build environment?

2019-03-30 Thread Jason Hsu
I'm trying to contribute to several open source projects, but I'm unable to get them working on my local machine. Fortunately, these open source projects use Travis CI. Unfortunately, I don't know how to replicate the Travis CI environment on my local machine, even with the use of Docker imag

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

2019-01-28 Thread Jason Hsu
I'm on the RailsBridge Bridge Troll project at https://github.com/railsbridge/bridge_troll. I am NOT a collaborator. My fork is at https://github.com/jhsu802701/bridge_troll. Someone else submitted a pull request that is now lagging several commits behind the upstream master branch. This pul

[Rails] When tests pass in CI but fail in the development environment

2019-01-23 Thread Jason Hsu
I understand that if your app's tests fail in the continuous integration environment but pass in your development environment, you should figure out why tests fail in CI and NOT blow off the matter. What should you do when the reverse is true - when tests pass in CI but not in your local develo

[Rails] Thankful for Ruby 2.6.0

2019-01-17 Thread Jason Hsu
I'm so thankful for the recent release of Ruby 2.6.0, which has allowed me to move on from 2.5.0. When trying to start a new app on a system with Ruby 2.5.0 and 2.5.3, I'd get messages like "Your Ruby version is 2.5.3, but your Gemfile specified 2.5.0" and "Your Ruby version is 2.5.0, but your

Re: [Rails] Re: Logging in as a seeded user in an OmniAuth app

2019-01-10 Thread Jason Hsu
to be used from a controller where you'll have > access to things like 'session' > I suggest you start by getting it working in the intended environment > before you try to pull it out into a standalone script. > > On Thu, 10 Jan 2019 at 22:16, Jason Hsu > > wr

[Rails] Re: Logging in as a seeded user in an OmniAuth app

2019-01-10 Thread Jason Hsu
OK, I'm trying out the bypass_sign_in feature. I'm getting the following error: /home/winner/.rbenv/gems/2.6.0/gems/devise-4.5.0/lib/devise/controllers/ sign_in_out.rb:112:in `expire_data_after_sign_in!': undefined local variable or method `session' for main:Object (NameError) I've put the scri

[Rails] Logging in as a seeded user in an OmniAuth app

2019-01-07 Thread Jason Hsu
Here's an example: I'm working on the CodeTriage app (https://github.com/codetriage/codetriage). I have CodeTriage working and passing tests in my local development environment. In this app, GitHub authentication is the sole authentication option. To avoid being automatically logged in in the

[Rails] Reasons to NOT have a test coverage badge

2019-01-03 Thread Jason Hsu
I'm already familiar with the reasons to have a test coverage badge in each Rails project. While I'm sure that the test coverage measurements have limitations, I believe that it's better to have a test coverage than to not have one. However, I've learned that an open source project that I'm wo

[Rails] Comment in the Blog test project

2018-12-26 Thread jason cao
Hi, How can I show error messages if a comment is invalid? E.g. when a comment body is empty. I add validation in the model class, and the validation itself works, but it won't show any error message. Can you please help? Many thanks! Regards, Jason -- You received this message becaus

[Rails] Reasons to NOT add ".DS_Store" to the .gitignore file

2018-12-13 Thread Jason Hsu
I'm contributing to an open source Rails app. I submitted a pull request to add .DS_Store to the .gitignore file. The purpose is to prevent people from accidentally adding the .DS_Store to the source code. Some people are objecting to this, saying that it's easy to use global gitignore. Whil

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

2018-11-28 Thread Jason Hsu
My development environment has rbenv with Ruby 2.5.0 and 2.5.3. I can start a new Rails app in Ruby 2.5.0 but not in Ruby 2.5.3. Here's the script I'm using for creating a quick and dirty Rails app: ``` #!/bin/bash # This script creates a basic Rails app that uses an SQLite database. # PURPOSE

Re: [Rails] Test coverage in Rails apps

2018-10-21 Thread Jason Hsu, Ruby on High Speed Rails
t; In development run your tests with the DISABLE_SPRING=1 flag before the > test command and see if you see a difference in coverage. > > On Sun, Oct 21, 2018 at 12:17 AM Jason Hsu, Ruby on High Speed Rails < > jhsu8...@gmail.com > wrote: > >> How can I get test cover

[Rails] Test coverage in Rails apps

2018-10-20 Thread Jason Hsu, Ruby on High Speed Rails
How can I get test coverage results to show more consistent results that make sense? I earlier decided against having SimpleCov and test coverage badges in my Rails apps. It seemed that no matter how I configured SimpleCov, there were some glaring flaws in its results. However, I have since c

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

2018-08-28 Thread Jason Hsu, Ruby on High Speed Rails
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 scripts and Ruby gems) to my version of the project, submit a pull request that omits

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

2018-08-28 Thread Jason Hsu, Ruby on High Speed Rails
Let's say that the project I'd like to work on is other_user/project1. I clone this project, and my version is myself1/project1. How do I proceed? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop

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

2018-08-28 Thread Jason Hsu, Ruby on High Speed Rails
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 certain things I'd like to add to a project (like Bash scripts and the annotate, rails-er

Re: [Rails] ActiveRecord model name conflicts with with instance method name

2018-07-25 Thread Jason Taylor
Oh wow, even easier an more succinct than I expected the answer to be! Thanks so much for the feedback. On Wednesday, July 25, 2018 at 6:38:05 AM UTC-6, Bruno Oliveira wrote: > > Hi, Jason. You can keep the name. The only difference is that you will > have to change the rel

[Rails] ActiveRecord model name conflicts with with instance method name

2018-07-24 Thread Jason Taylor
Rails applications so I'm just trying to gain an understanding of why this would be taken by ActiveRecord. Thanks, Jason -- 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] Continuous integration for BitBucket/GitLab

2018-07-12 Thread Jason Hsu, Ruby on High Speed Rails
Have any of you made the switch from GitHub to BitBucket or GitLab? What are you using for integration services? Hakiri and CodeClimate seem to support only GitHub. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from t

Re: [Rails] newbie: copy file from github to local directory?

2018-06-06 Thread Jason McMahan
copy_stream(download, '/etc/udev/rules.d/66-azure-storage.rules') #do something end end On Wednesday, June 6, 2018 at 5:56:43 AM UTC-5, Jason McMahan wrote: > > The url is > https://github.com/Azure/WALinuxAgent/blob/master/config/66-azure-storage.rules >

Re: [Rails] newbie: copy file from github to local directory?

2018-06-06 Thread Jason McMahan
/etc/udev/rules.d/66-azure-storage.rules #then do something. end Thank you all the quick replies and help thus far it is appreciated. On Tuesday, June 5, 2018 at 4:15:08 PM UTC-5, Hassan Schroeder wrote: > > On Tue, Jun 5, 2018 at 1:14 PM, Jason McMahan > wrote: > > > I am

[Rails] newbie: copy file from github to local directory?

2018-06-05 Thread Jason McMahan
Good day, I am new to rails and would like suggestions/help to copy a file from github to a local directory. I assume use the FileUtils but any help would be appreciated. Thank you -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To uns

[Rails] Creating RSpec factory objects for the ENTIRE test suite

2018-06-02 Thread Jason Hsu, Ruby on High Speed Rails
There are plenty of examples on how to create RSpec factory objects for just one set of tests. Is there a way to create RSpec factory objects that are good across ALL tests (including ALL integration and controller tests)? This is necessary for a project to work on, because the process of crea

[Rails] Re: reading windows environment variables

2018-05-16 Thread Jason McMahan
In Irb i am able to run ENV['OvInstallDir'] Returns the correct path 'c:\program files\' THank you for any further help. On Wednesday, May 16, 2018 at 12:57:47 PM UTC-5, Jason McMahan wrote: > > Could someone please suggest how i could read environment variables from

[Rails] reading windows environment variables

2018-05-16 Thread Jason McMahan
Could someone please suggest how i could read environment variables from windows? In cmd i can run "%ovinstalldir%bin\win64\test.bat" -version However i am attempting to do the same in the irb and not sure how i should do that. Any help is greatly appreciated. Thank you -- You received thi

[Rails] active directory group help please

2018-05-03 Thread Jason McMahan
Good day, I am new to Ruby but it is used for types and providers in puppet. I am attempting to fix a module that isnt working. def exists? self.class.send_log(:info, "call exists?") begin myreturnvalue = powershell([ "import-module activedirectory;","Get-ADGrou

[Rails] A Rails tutorial with much shorter chapters

2018-02-26 Thread Jason Hsu, Ruby on High Speed Rails
Check out my Ruby on Rails tutorial at https://github.com/jhsu802701/tutorial-rails-rubymn2 . It was inspired by Michael Hartl's Rails Tutorial and chronicles the process I used for building a new Rails site for Ruby Users of Minnesota. Like Rails Tutorial, my tutorial features test-driven dev

[Rails] Ruby gem's executable "setup" conflicts with another gem

2017-08-20 Thread Jason Hsu, Ruby on High Speed Rails
The gem in question is GenericApp (https://github.com/jhsu802701/generic_app/). When I enter the command "gem install generic_app", I get the following error message: generic_app's executable "setup" conflicts with string_in_file string_in_file is a gem used by generic_app. But for the life of

[Rails] Ruby on Racetracks tutorials

2017-08-20 Thread Jason Hsu, Ruby on High Speed Rails
Check out my tutorials on much faster ways to get started in Ruby on Rails at http://www.rubyonracetracks.com/tutorials.html . Thanks to Docker, you can have Ruby on Rails ready to roll in minutes, not hours. Thanks to VirtualBox, you don't need to install Ruby on Rails in Windows or figure o

[Rails] Rails 4.0 + Rails 4.1 CSRF problems affecting IE 11, Edge, newer versions of Android and mobile Safari

2017-08-07 Thread Jason Fleetwood-Boldt
this would be a compelling reason for us to upgrade to Rails 5, as we think we are loosing a significant amount of traffic due to this bug. If not, I am wondering if others are seeing this too and what can be done to address this issue. -Jason Jason Fleetwood-Boldt t...@data

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

2017-07-26 Thread Jason FB
https://stackoverflow.com/questions/45329731/csrf-tokens-to-not-match-what-is-in-session-rails-4-1 We are seeing an unfortunate and likely browser-based CSRF token authenticity problem in our Rails 4.1 app. We are posting it here to ask the community if others are seeing it too. Please be awa

Re: [Rails] cach invalidation help

2017-06-19 Thread Jason Fleetwood-Boldt
Correction: this referenced blog post is from 2012, not 2013 > On Jun 19, 2017, at 10:13 AM, Jason Fleetwood-Boldt > wrote: > > > Not sure were you got all of this code from… were you following an example > somewhere? > > This appears to be way overcomplicated for

Re: [Rails] browser simulator independent of web framework

2017-06-19 Thread Jason Fleetwood-Boldt
hcoming, they plan to abandon phantomjs in favor of Chrome's headless mode. Not sure if that's really true or when that will happen. -Jason > On Jun 18, 2017, at 8:36 AM, Colin Law wrote: > > On 18 June 2017 at 12:21, Martin Luy wrote: >> I'm extracting content

Re: [Rails] cach invalidation help

2017-06-19 Thread Jason Fleetwood-Boldt
have looks like you went down a caching rabbit hole that is unnecessary. (But learning the internals of the Rails caching mechanism is a good thing for your own edification!) -Jason > On Jun 18, 2017, at 2:51 AM, Arup Rakshit wrote: > > I have the below code: >

Re: [Rails] jquery logic

2017-06-16 Thread Jason Fleetwood-Boldt
on, it still means if you want to build a large, robust front-end app you'll probably be picking a JS framework or writing a bare-bones one yourself (or using a bare-bones one, like Backbone, which is what I prefer.) What you are doing with RJS/UJS is the way to go for your purposes for a s

Re: [Rails] rubymine 2.4.1

2017-06-07 Thread Jason Fleetwood-Boldt
http://www.jasonfleetwoodboldt.com/writing/2014/10/14/how-to-install-an-older-version-of-rails/ > On Jun 6, 2017, at 7:40 PM, Joe Guerra wrote: > > Lol, now I've got to get rails installed for that version. > > My default version is still 2.3.1. Jas

Re: [Rails] http requests

2017-06-06 Thread Jason Fleetwood-Boldt
ronicles), dead (that happens too— in fact I've corresponded with Github tech support over their policy regarding passed-away authors), or no longer cares, you can detach your fork from the origin repository and make a "V2" (or whatever) of the gem, upgraded with your fixes, rename i

Re: [Rails] passing params to controller redirects

2017-06-06 Thread Jason Fleetwood-Boldt
t > https://groups.google.com/d/msgid/rubyonrails-talk/8dc82eee-1301-4fbc-818b-2bd57984c8dc%40googlegroups.com > > <https://groups.google.com/d/msgid/rubyonrails-talk/8dc82eee-1301-4fbc-818b-2bd57984c8dc%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more

Re: [Rails] How do I make JSON api calls?

2017-06-05 Thread Jason Fleetwood-Boldt
format the data the way you want it, and show it to the user. Your question was very high level and so was this answer. As a more specific/detailed question if you want a more specific/detailed answer. Your mileage may vary. -Jason > On Jun 5, 2017, at 11:56 AM, Charlie Lor wrote: >

Re: [Rails] http requests

2017-05-31 Thread Jason Fleetwood-Boldt
eed it for this immediate purpose. -Jason > On May 31, 2017, at 1:39 PM, Joe Guerra wrote: > > Ok, I'll try the gem. > > How about passing the parameters in the url? and opening up the canada post > site with that? > > Thanks, > Joe > > On Wed

Re: [Rails] sql select rolls back trying to figure out why

2017-05-05 Thread Jason Fleetwood-Boldt
ching or clear the Rails cache. -Jason Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing If you'd like to reply by encrypted email you can find my public key on jasonfleetwoodboldt.com <http://jasonfleetwoodboldt.com/> (more about setting

Re: [Rails] sql select rolls back trying to figure out why

2017-05-04 Thread Jason Fleetwood-Boldt
ot going to get you where you need to be. Best of luck! -Jason > On May 4, 2017, at 12:25 PM, fugee ohu wrote: > > > > On Thursday, May 4, 2017 at 12:00:06 PM UTC-4, Jason FB wrote: > Try ActiveRecord Query Trace > > see... > > https://github.com/ruckus/acti

Re: [Rails] sql select rolls back trying to figure out why

2017-05-04 Thread Jason Fleetwood-Boldt
crash within the transaction itself, which would then cause the transaction to be rolled back. -Jason > On May 3, 2017, at 11:35 PM, fugee ohu wrote: > > > > On Wednesday, May 3, 2017 at 9:44:06 PM UTC-4, Walter Lee Davis wrote: > > > On May 3, 2017, at 9:07 PM

Re: [Rails] conditional validatiobs

2017-03-29 Thread Jason Knabl
Use the `unless` key instead of `if` on the validation. This will perform the validation unless the column is null, i.e., will perform validation if the column is not null. http://guides.rubyonrails.org/active_record_validations.html#conditional-validation -Jason On Mar 29, 2017 8:35 AM

[Rails] Re: Using Mailgun in Heroku

2017-02-09 Thread Jason Hsu, Ruby on High Speed Rails
When I enter "heroku logs", the error message I get is: Net::SMTPFatalError (554 Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in Account Settings. -- You received this message because you are subscribed to the Google Group

[Rails] Using Mailgun in Heroku

2017-02-09 Thread Jason Hsu, Ruby on High Speed Rails
How do you use Mailgun in the Heroku production environment for transactional emails? I've already successfully implemented SendGrid for transactional emails. I've written up the whole procedure at https://gist.github.com/jhsu802701/a7ac8d4ccdc5d993a61a9de293f104df . What's the proper procedu

[Rails] Re: Trouble with downloading Ruby

2017-01-27 Thread Jason Hsu, Ruby on High Speed Rails
Use Docker. Go to my web site Ruby on Racetracks at http://www.rubyonracetracks.com/, click on Installation, and click on "Getting Started". You can have Ruby on Rails ready to roll in minutes, not hours. You can also reset the Docker container to its original conditions in just a few second

[Rails] Rails From Scratch and Generic App version 2

2017-01-27 Thread Jason Hsu, Ruby on High Speed Rails
Check out Version 2 of my gem GenericApp https://github.com/jhsu802701/generic_app) for creating a new Rails app. No other Rails template app is this comprehensive. I created the template app used as the basis for GenericApp with my Rails >From Scratch protocol athttps://github.com/jhsu8027

[Rails] Your procedure for starting a new Ruby on Rails app

2016-10-22 Thread Jason Hsu, Ruby on High Speed Rails
I'm currently working on a procedure for starting a new Ruby on Rails app. The URL is https://github.com/jhsu802701/rails_from_scratch_rails5 . The idea is to be able to create a HIGH-QUALITY starter app with authentication and comprehensive tests completely from scratch in just a few hours.

[Rails] App passes all test in development but fails in Travis

2016-09-09 Thread Jason Hsu, Ruby on High Speed Rails
My Rails app consistently passes all tests in the development environment, but my Travis builds keep failing. The source code is at https://github.com/jhsu802701/generic_app_template_rails5/tree/travis . The test results are at https://travis-ci.org/jhsu802701/generic_app_template_rails5 The p

[Rails] Passing parameters to JS

2016-07-19 Thread Jason Hou
Share a gem https://github.com/falm/js-namespace-rails that can execute page-specific javascript and passing parameters from controller to assets js fiel -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

Re: [Rails] Codeclimate test coverage: dinged for config/initializers/rack_profiler.rb

2016-03-28 Thread Jason Hsu, Ruby on High Speed Rails
It's easier to see changes when I'm at 100%. What I'm trying to do is analogous to configuring Rubocop and Rails Best Practices to ignore certain violations. (Given how nitpicky these tools can be, some violations may not be worth correcting.) On Sunday, March 27, 2016 at 12:46:51 AM UTC-5, t

[Rails] Codeclimate test coverage: dinged for config/initializers/rack_profiler.rb

2016-03-26 Thread Jason Hsu, Ruby on High Speed Rails
My project at https://github.com/jhsu802701/losemoneyfast is rated at 98.7% test coverage. I'm getting dinged for config/initializers/rack_profiler.rb . Is there something I can do to fix this or to get the CodeClimate engine to skip this file in its test coverage analysis? -- You received t

[Rails] Ruby on Racetracks

2016-03-25 Thread Jason Hsu, Ruby on High Speed Rails
Check out my new web site Ruby on Racetracks at http://www.rubyonracetracks.com . On this site, I have described the use of tools like Docker, GenericGem, and GenericApp for getting more done in less time while improving quality. If you find the conventional procedures to be too time-consuming

[Rails] Integration tests involving Javascript dialog boxes

2016-02-04 Thread Jason Hsu, Ruby on High Speed Rails
I'm working on an integration test for a project that uses minitest and Capybara. You can find the source code in question at https://github.com/jhsu802701/ruby_mn_site/blob/sponsors_delete/test/integration/sponsors_change_test.rb in the section 'super admin can add, change, or delete sponsors

Re: [Rails] Re: Why is admin_signed_in? false even after logging in as admin?

2015-12-11 Thread Jason Hsu, Ruby on High Speed Rails
before_filter/before_action statement doesn't replace the need for those if statements. On Friday, December 11, 2015 at 12:44:41 PM UTC-6, Rob Biedenharn wrote: > > > > On 2015-Dec-11, at 13:12 , Jason Hsu, Ruby on High Speed Rails < > jhsu8...@gmail.com > wrote: &g

[Rails] Re: Why is admin_signed_in? false even after logging in as admin?

2015-12-11 Thread Jason Hsu, Ruby on High Speed Rails
The admin_signed_in? method comes from the Devise gem. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To p

[Rails] Why is admin_signed_in? false even after logging in as admin?

2015-12-11 Thread Jason Hsu, Ruby on High Speed Rails
Back story: I'm developing a new Rails site for the local Ruby user group. I'm using Devise to provide authentication for separate user and admin classes. Current task: I'm working on the create/new function for the sponsor class. Sponsors are an independent class and are not tied to users, ad

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

2015-12-02 Thread Jason Hsu, Ruby on High Speed Rails
How long ago was this? According to the spec sheet (http://www.dell.com/downloads/us/products/optix/gx270_spec.pdf), the Dell Optiplex 270 came with Windows 2000 or XP and an 800 MHz Pentium processor. This sounds like a relic from about 2001 or 2002, which is eons ago when it comes to comput

[Rails] Re: Developing WITHOUT Vagrant/VirtualBox

2015-12-02 Thread Jason Hsu, Ruby on High Speed Rails
assler wrote: > > Hi Jason, > > I used to develop inside a virtual machine as well (VMWare and VirtualBox) > but made the switch to development on the same operating system for > hardware reasons. The "workstation" I was provided with didn't have the > specifica

[Rails] Developing WITHOUT Vagrant/VirtualBox

2015-12-02 Thread Jason Hsu, Ruby on High Speed Rails
I regard Vagrant as indispensable for Ruby on Rails development. (My setup is at https://github.com/jhsu802701/vagrant-debian-jessie .) Before I learned to use Vagrant, I used VirtualBox directly for Ruby on Rails development. That said, I also know that most people rely on Ruby on Rails inst

[Rails] Re: Dynamic Links within a namespace

2015-11-12 Thread Jason Or
This worked perfectly! Thank you!!! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr.

[Rails] Namespaces, dynamic links and routing

2015-11-06 Thread Jason O
name' => 'people#user_name', as: :user_name but this has not worked. Thanks for any help! Jason -- 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

[Rails] Andriod tablets

2015-08-26 Thread Jason Weber
hello, im new to learning ruby, does anyone know if you can use a tablet to run ruby or do you need a computer to run it? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, s

Re: [Rails] Docker for Ruby on Rails

2015-08-19 Thread Jason Hsu, Ruby on High Speed Rails
RVM problems (or possible RVM problems) are rare but have happened to me. A much more common situation I've run into is a cascade of error messages when I tried to transfer my project to another development environment or when I tried to deploy my project. In the case of Ruby gems, I've had tim

Re: [Rails] Docker for Ruby on Rails

2015-08-19 Thread Jason Hsu, Ruby on High Speed Rails
By "reset", I'm talking about returning Ruby on Rails to its original state from just after you first installed it and before you did anything with it. My Debian Stable Vagrant base box comes with RVM pre-installed, along with multiple versions of Ruby, each with multiple versions of Rails. Thi

[Rails] Docker for Ruby on Rails

2015-08-19 Thread Jason Hsu, Ruby on High Speed Rails
Is anyone here using Docker for Ruby on Rails? I've been boning up on Docker due to the promise of being able to reset Ruby on Rails instantly. (It takes a few minutes to destroy and rebuild my Debian Stable Vagrant box. And forget about trying to reinstall Ruby on Rails if you have it instal

[Rails] Re: Restrict application layout for certain views

2015-08-09 Thread Jason Walsh
Dave Aronson wrote in post #1176892: > On Sat, Jul 25, 2015 at 3:44 PM, Jason Walsh > wrote: > >> Is there any way to change / restrict the application layout for certain >> views? > > You can do that by specifying the layout in the controller. See: > >

[Rails] Restrict application layout for certain views

2015-07-25 Thread Jason Walsh
Hi folks Is there any way to change / restrict the application layout for certain views? For example, I don't want to render the header for a certain view, is there any code such as: <% if View != show.html.erb%> <%= render 'layouts/header' %> <% end %> Tha

[Rails] Search Form On New/Edit View

2015-07-14 Thread Jason Smith
nts to see what I'm shooting for--this is/will be Open Source when complete. Thanks much for your time! Sincerely, Jason Smith QualityAddict Code | https://github.com/QualityAddict/quality-nexus Live | http://qualitynexus.herokuapp.com/home -- You received this message

[Rails] Correcting "scope access" warning from Rails Best Practices

2015-06-30 Thread Jason Hsu, Ruby on High Speed Rails
The code in question works, but Rails Best Practices docks me with a scope access warning. The code in question is: def show # NOTE: rails_best practices recommends using scope access redirect_to(root_path) unless current_user == User.find(params[:id]) @user = User.find(params[:id]

[Rails] Re: Testing: executing "visit" command ends session

2015-06-26 Thread Jason Hsu, Rubyist
I get error messages that indicate that nobody is logged in. The admin should be able to view the admin index page, but the users and the general public should not be able to. Unfortunately, the test doesn't show that the admin can view the admin index page. While this works in my developmen

[Rails] Re: Testing: executing "visit" command ends session

2015-06-26 Thread Jason Hsu, Rubyist
to do? I can't possibly be the first person to use Minitest for testing the visibility of a page for different types of users. On Thursday, June 25, 2015 at 11:31:18 AM UTC-5, Ruby-Forum.com User wrote: > > Hello Jason, > > I think need to change some code. You n

[Rails] Testing: executing "visit" command ends session

2015-06-25 Thread Jason Hsu, Rubyist
The code in question is at https://github.com/jhsu802701/generic_app_template/blob/master/test/integration/admins_view_test.rb . I've used the Devise gem to create users and admins. I've successfully made the admin index page visible ONLY to admins, but it's failing the tests (Capybara and m

[Rails] Testing for redirects

2015-06-21 Thread Jason Hsu, Rubyist
I have an app with admin users created with the devise gem. I have succeeded in redirecting anyone who tries to access an admin profile page but is NOT logged in as an admin to the root_path (http://localhost:3000). However, I'm having difficulty getting the tests to pass in my integration tes

[Rails] #count and #size

2015-06-09 Thread Jason Waldrip
inconsistency on the #size method where in the result is either the result of #count if unloaded or #length of the results when loaded. I plan as proposing this as a PR, but thought to first start it as a discussion in the google group. Please share your opinions on my proposal. Cheers, Ja

[Rails] Rails/Devise: testing the user confirmation process

2015-06-03 Thread Jason Hsu, Rubyist
BACK STORY: I'm working on a Rails app template that is similar to the Rails Tutorial Sample App. The idea is to begin every app I ever start with a pre-made template so that I don't have to plow through chapters 3 through 10 in Rails tutorial. I can have the app set up AND tested in just a f

[Rails] Do you use the devise gem to create users in your Rails apps?

2015-04-26 Thread Jason Hsu, Rubyist
I'd like to hear your opinions. On the one hand, it's clearly easier in the short run to use the devise gem. On the other hand, Rails Tutorial maintains that modifying an off-the-shelf solution is a "black box" and can be more work than creating the user functionality from scratch. -- You rec

[Rails] Updated Rails site: Lose Money Fast

2015-04-23 Thread Jason Hsu, Rubyist
Check out my new and improved version of my Rails site Lose Money Fast at https://losemoneyfast.herokuapp ­ . You can buy thousands of fictional Mega Millions and Powerball tickets every virtual week. You never run out of money, but your return on "inve

[Rails] Debian Jessie Vagrant box with RVM

2015-04-23 Thread Jason Hsu, Rubyist
Debian Jessie is about to become the new Debian Stable. I have released my new Debian Jessie Vagrant box at https://github.com/jhsu802701/vagrant-debian-jessie-rvm as a replacement for the old Debian Wheezy Vagrant box. The old Debian Wheezy Vagrant box is still available, but I will not be m

[Rails] NEW GEM: GenericGem

2015-03-19 Thread Jason Hsu, Rubyist
Check out my new gem called GenericGem, which streamlines the process of creating a new gem. There are many generic and routine tasks common to all or most gems but are all too easy to forget. GenericGem takes care of these tasks so that you can focus on your gem's unique capabilities. Just e

[Rails] Database connections, I cannot decide which way I should go!

2015-03-16 Thread Jason O
ICLES table and list any articles that have the corresponding Author_ID. I am happy to supply any code that I currently have if it is requested. Thank you again for your time and help! Jason -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&

[Rails] Re: YOUTUBE: Debian Stable Vagrant Box (plus music)

2015-03-06 Thread Jason Hsu, Rubyist
As an added bonus, these videos have catchy musical soundtracks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups

[Rails] YOUTUBE: Debian Stable Vagrant Box (plus music)

2015-03-06 Thread Jason Hsu, Rubyist
Check out my 3-part YouTube presentation on my Debian Stable Vagrant box at http://www.youtube.com/playlist?list=PLfd4iay29eVBey-eRCvjWvO1pGj4_E_Us . Your Ruby on Rails environment will be ready to roll in MINUTES instead of hours. If RVM behaves in unexpected ways, or if you need to make sure

[Rails] PostgreSQL password in environment variables

2015-02-20 Thread Jason Hsu, Rubyist
I've heard that using environment variables to provide the password and other PostgreSQL parameters is the way to go. Is the Nitrous.io way (explained at http://help.nitrous.io/postgres/) the way you do it? Or is there a better way? -- You received this message because you are subscribed to

[Rails] Heroku: Why isn't the config/database.yml file relevant?

2015-02-20 Thread Jason Hsu, Rubyist
As you know, Heroku uses the PostgreSQL database by default. However, when you deploy an app that you created with the use of SQLite in the development environment, the config/database.yml file on the Heroku server is still configured for SQLite. Exactly how does Heroku make the config/database

[Rails] Re: Rails redirect_to new behaviour with Ruby 2.2 / Rails 4.2?

2015-02-13 Thread Jason Hobbs
Add gem 'responders' to your Gemfile. redirect_to was moved to that. On Friday, February 13, 2015 at 10:02:04 AM UTC-6, Ruby-Forum.com User wrote: > > Trying to upgrade from Ruby 2.0 / Rails 4.0 to Ruby 2.2 / Rails 4.2, I > face a surprising error when logging into my application (based on Rails

[Rails] Re: [Newbie] Filtering Index page

2015-02-10 Thread Jason O
Thank you for the welcome and the response! What have given me works great! With the exception of the {:class => "button"} which throws up a wrong number of arguments (4 for 0..3) error. I am looking into this to see if I can find out more. I tried this also with the button_to which makes the

[Rails] [Newbie] Filtering Index page

2015-02-09 Thread Jason O
. Thanks again for any help! Jason -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this g

[Rails] RVM alternatives

2015-02-05 Thread Jason Hsu, Rubyist
I understand that some people prefer rbenv, chruby, and perhaps other programs over RVM for Ruby on Rails. There is a list of alternatives at https://github.com/wayneeseguin/rvm/blob/master/docs/alt.md . I'm using RVM, because that's what most people use and because that's what railstutorial.o

[Rails] Why isn't Vagrant standard practice?

2015-02-04 Thread Jason Hsu, Rubyist
I'm doing my part. My Debian Stable Vagrant box with pre-installed Ruby on Rails (https://github.com/jhsu802701/vagrant_debian_wheezy_rvm) is now part of my standard operating procedure. Is there any reason that use of Vagrant is NOT already universal in the Ruby on Rails community? The issue

  1   2   3   4   5   6   7   8   >