Code Monkey home page Code Monkey logo

Comments (5)

mmircea16 avatar mmircea16 commented on August 28, 2024

Thanks for highlighting the issue!

I was thinking that this line:
config_file =Pathname.new(File.dirname(__FILE__)).join('config/config.yml').to_s in config.ru would use the fully expanded path and everything would be fine.

Are you seeing the issue when using the config.ru from the repo? Or you seeing when you are using a custom config.ru?

from hacienda.

moomerman avatar moomerman commented on August 28, 2024

Yeah, the problem is when using the config.ru from the repo. I thought it should provide the fully expanded path too, but this is the output:

config_file = Pathname.new(File.dirname(__FILE__)).join('config/config.yml').to_s
puts config_file
=> config/config.yml

When changed to this it's fine:

config_file = File.expand_path('config/config.yml', File.dirname(__FILE__))
puts config_file
=> /Users/richard/workspace/hacienda/config/config.yml

from hacienda.

moomerman avatar moomerman commented on August 28, 2024

Seems this is the root cause of the issue:

http://stackoverflow.com/questions/15358669/confusing-behavior-of-file-dirname

When I run puts File.dirname(__FILE__) I get .

from hacienda.

mmircea16 avatar mmircea16 commented on August 28, 2024

Good catch! Thank you for investigating it!

I have replaced the config_file line as you suggested in here: www-thoughtworks-com@0375189 I am keen on keeping the path in config_loader as absolute and make sure it's passed like that. I feel it's important as it's less ambiguous than trying to figure out what is the relative path relative to.

I hope this solves your issue! If you have more issues or questions, I would be keen to help!

from hacienda.

moomerman avatar moomerman commented on August 28, 2024

Great thanks! master is working for me now. I've hit a couple of other issues with creating and updating content but will post separate issues for those tomorrow.

from hacienda.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.