jaems

Joined

1,010 Experience
0 Lessons Completed
1 Question Solved

Activity

Agreed, but I wouldn't keep it like that for very long
`777` is bad news.  If you're having to change perms to owner/group/world full read/write/exec something is wrong.

Posted in Can't connect to rails server

No problem, if you ran it as sudo that's the problem.  You'll want to work with your project as a local user not running as sudo (root).  Without seeing how things are setup, it's tricky to diagnose the issue.  But are you in a place where you can scap your config on cloud9 and start again without using sudo?

Posted in Can't connect to rails server

If you're getting permission denied, perhaps you ran your bundle or installation of rails as sudo?  Are you on Linux/Mac/etc?  Any further information you can provide would be helpful.

Posted in Can't connect to rails server

As far as development, that traditionally means your local machine (laptop/desktop/etc).  

Posted in Can't connect to rails server

No problem, Austin.  Couple of questions...

Do you have bundler installed and have you completely bundled everything in your Gemfile?  I randomly searched for the error in your stacktrace and found [this](https://stackoverflow.com/questions/43813749/error-undefinded-method-load-defaults-when-trying-to-deploy-app-on-heroku) article which seems to be similar in nature.  

Also, can you clarify if you are trying to launch rails in development or is this a deployment you're trying to work with?

Posted in PRO Video Frequency

I think a weekly pro video is good for the money we pay for subscriptions.  If you want more content, there's a lot out there on Youtube and other resources.  

Posted in Can't connect to rails server

Try `rails s` to see if the rails server will start.  If so, it will output a url of `http://localhost:3000`  If that works, it's not a problem with Rails but whatever args you are passing it.

If you are developing on your local machine you don't have to bind an ip address unless you have a specific reason to.  If you did you could do `rails s -b 0.0.0.0` and if you wanted to specify a port `rails s -b 0.0.0.0 -p 9001`

Please try it this way to see if it makes a difference.

-James


I also watched the course on pluralsight, which I belive is the same content.  Really good stuff!

Posted in Error with the Scheduled Posts Episode

As a test, try this...

module ArticlesHelper
  def status_for(article)
    if article.published_at.present?
      if article.published_at > Time.zone.now
        "Scheduled"
      else
        "Published"
      end
    else
      "Draft"
    end
  end
end

Posted in Error with the Scheduled Posts Episode

Hi Simon,

Double check your migration(s) on the Article class/model to make sure you have a published_at column. If it's missing it'll throw a no method error. I cloned the gorails repo for this episode and had no problems with the code Chris wrote.

If you run into any problems, please leave another comment on this thread.

Happy weekend!

Posted in Active Storage (Rails 5.2) vs Shrine

Active Storage works fine for file uploads especially to s3 and works nicely, but honestly I'd probably wait a bit until they cut the 5.2 release since there are still some open issues on it. As Jack mentioned it's not as feature-rich as Shrine or other gems. I'm on 5.1.4 and I use either Shrine or Carrierwave as my needs are simple. Honestly, probably best for you to test out both and see which one fits your use case.

You can use acts_as_taggable but you can really get the same functionality with categories and tags using a has_many_through relationship between your content and categories/tags.

You can see an example of how I did this with categories with a simple wiki app I built: here

For more info, check this out Passenger/Nginx reference

@karim I don't know anything about hatch, I just use straight servers without the bells/whistles. But the configuration declarative should go in your nginx host block.

That should keep however many cores you have busy :)

Basically, you specify that your rails app run "8 processes" at once and each will use one core. The way it can be done is by using phusion passenger (with Nginx) and set the following parameters
passenger_max_pool_size 8;
passenger_max_instances_per_app 8;

Posted in Looking for Rails work? / Hiring Rails developers?

Hiring:

Looking for Ruby/Rails devs with 5+ years of experience. Must be proficient in Ruby/Rails/API and have at least a basic understanding of JS and React.

Pay is competitive, fully remote position, good culture, great people to work with. If you're interested PM me on Slack or reply to this thread.

Posted in Allow lvh.me with my ISP router

You didn't specify that you needed such.

Posted in Allow lvh.me with my ISP router

Hmmm, well Jacob's suggestion on editing your /etc/hosts file is probably your best bet.