DEV Community

Andy Zhao (he/him) for The DEV Team

Posted on with Jess Lee and Mac Siri

dev.to open source help/discussion thread (v0)

This is the starting point for getting help on any issue relating to working with the dev.to open source project. This thread will act as an FAQ destination of sorts. Do not feel shy posting here, we'll continuously keep an eye on this thread and we urge anyone to hop in to help in any way they can.

We will occasionally start new threads with an updated version number to keep up with the state of the project as things change over time and information in here become out of date.

We plan to eventually use DEV Connect channels as sort of breakout rooms for different parts of the project, but not as one massive room. The specifics of how we’ll leverage Connect rooms is a bit to be determined.

I urge folks involved in the project to hit the save button (🔖) to track discussion in these threads in your reading list comment activity area.

Happy coding ❤️

Oldest comments (109)

Collapse
 
ben profile image
Ben Halpern The DEV Team

We'll be here for any and all random problems folks run into.

Collapse
 
stargator profile image
Stargator

Have you given any (and I mean any) thought to using Dart in the future? Whether via AngularDart for the frontend or Dart on the backend?

What about Flutter for Android and iOS apps?

Collapse
 
ben profile image
Ben Halpern The DEV Team

I've played around with Flutter. I don't think it necessarily fits our use cases today, but I am all for keeping an eye on Flutter and Dart as choices for new things in the future. (And possibly for our current native app story, but need to be convinced)

Collapse
 
s_awdesh profile image
Awdesh

1.) Could we create a separate CONTRIBUTING.md file for "How to Contribute" guidelines?

Collapse
 
ben profile image
Ben Halpern The DEV Team

Yeah, I think that makes sense.

Collapse
 
itsasine profile image
ItsASine (Kayla)

Does anyone know how to update the built-in version of ruby on Mac?

➜  ~ ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]
➜  ~ /usr/local/Cellar/ruby/2.5.1/bin/ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]

I ended up getting around it by using RubyMine and telling it to use the brew version for the dev.to environment, and then I set up the bin scripts as run configurations.

Since I had ruby 2.5.1 installed, I wasn't terribly inclined to download RVM just so it could download its own version of ruby, too. I just don't think this was the most optimal way of fixing my version issues.

(And as someone who never used postgressql before, that part was not intuative at all... but I have no clue how to fix that in the docs, since I was bumbling my way through it)

Collapse
 
rhymes profile image
rhymes

I use RVM because I have different projects using different versions of Ruby and it's useful for that:

➜  ~ rvm list
   ruby-2.3.0 [ x86_64 ]
   ruby-2.4.3 [ x86_64 ]
=* ruby-2.5.1 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

(And as someone who never used postgressql before, that part was not intuative at all... but I have no clue how to fix that in the docs, since I was bumbling my way through it)

Can you please articulate what issues did you have? I think it's very important because a difficult onboarding can be a turn off for first contributors. Thank you!

Collapse
 
itsasine profile image
ItsASine (Kayla)

My issue was trying to figure out how to articulate it late at night ;)

I think the issues started with completely blowing past the hey you need to install this stuff first section of the README and just starting to get the local build working with stuff like api keys and bundle install. And since I was having issues with the ruby version, I was inclined to think all my issues were around ruby rather than the db.

The biggest thing after needing it installed was needing to have it run before running anything. The installation was lumped with installing things like bundle and yarn which are more hands-off, so it wasn't clear that after installing the prereqs, I should actually start the db and that it wasn't handled in the bin scripts like everything else.

Then I wanted to actually see what was in the db, so I hunted through the configs and internet to see how to find the settings of the db that's created to connect to it within RubyMine.

It wasn't anything really hard or missing, just stuff that wasn't obvious as someone not in the stack.

Collapse
 
andy profile image
Andy Zhao (he/him)

(And as someone who never used postgressql before, that part was not intuative at all...

Ah gotcha, we'll shore that up for the next iteration. What sort of issues are you having right now with it?

Does anyone know how to update the built-in version of ruby on Mac?

Are you using a Ruby version manager? You probably have rbenv or rvm installed.

Collapse
 
itsasine profile image
ItsASine (Kayla)

Are you using a Ruby version manager?

As far as I know, I have not because I'm not a Rubyish person, but I can check once I get home. I knew I brew installed it and would have installed it way back when for brew (since I'm pretty sure brew runs on ruby) but otherwise I don't recall ever doing anything with ruby.

What sort of issues are you having right now with it?

Right now, nothing, since I was eventually able to get local dev.to up and running to get my screenshots for my PR :) Originally, though, since I was only installing it to use dev.to, I didn't:

  1. have it installed (ended up installing it outside of the recommended path since I was trying to solve ruby errors rather than continue reading the readme and find what I skipped over)
  2. have it running (lots of googling eventually found me to where a blog somewhere listed the command to run it)
  3. or how to access it (I loved the seed data scripts but wanted to add a user with specific data to hit my cases... I ended up setting up Github integration to use myself, but eventually figured out how to list known databases and then I could use RubyMine's built-in db handling to modify local data)

Like, reading the section of hey install this stuff didn't really click with me to actually run the database and that it was not a part of the bin scripts.

Thread Thread
 
andy profile image
Andy Zhao (he/him)

Ah gotcha, sorry that wasn't clear! We'll definitely update the instructions for the prerequisites.

And yep, let me know if you still have issues with your Ruby, or anything else really. 🙂

Collapse
 
s_awdesh profile image
Awdesh

I have similar issue running bundle install

bundle install
Your Ruby version is 2.0.0, but your Gemfile specified 2.5.1

only have Ruby 2.5.1 installed.

 ~/.rbenv/versions
❯ ls
2.5.1

I have tried restarting terminal and machine both just to clear cache if there's any.

Collapse
 
rhymes profile image
rhymes

Did you set 2.5.1 as the global version?

According to karloespiritu.github.io/cheatsheet... you need to type: rbenv global 2.5.1, otherwise it uses the default version shipped with the OS

Collapse
 
s_awdesh profile image
Awdesh

Thanks for the cheatsheet. Yes, I have tried rbenv global 2.5.1.

Thread Thread
 
rhymes profile image
rhymes

When you are in the directory of the project, what does rbenv version say?

Thread Thread
 
s_awdesh profile image
Awdesh

rbenv version
2.5.1 (set by /Users/awdesh/Documents/source/sandbox/dev.to/.ruby-version)

I feel like something is messed up with the /etc/paths/ although can't seem to figure it out. I am following this link here-: stackoverflow.com/questions/873067...

Thread Thread
 
andy profile image
Andy Zhao (he/him)

What's the output of ruby -v compared to rbenv version?

Try running rbenv shell 2.5.1 and then running bundle.

If not, a reinstall of 2.5.1 might help:

rbenv uninstall 2.5.1
# restart terminal
rbenv install 2.5.1
# install complete; restart terminal
ruby -v
#=> ruby -v version
rbenv version
#=> rbenv version

Let me know how it goes!

Thread Thread
 
s_awdesh profile image
Awdesh • Edited

Thanks Andy. I did a reinstall of rbenv and ran below.

❯ ruby -v

ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin15]

❯ rbenv version
2.5.1 (set by RBENV_VERSION environment variable)

❯ rbenv shell 2.5.1

still see the same issue.

❯ bundle install
Your Ruby version is 2.0.0, but your Gemfile specified 2.5.1

Thread Thread
 
andy profile image
Andy Zhao (he/him)

Ah, your bundle install might be running from your old Ruby version as opposed to the latest one.

Try running which gem and which bundle. You should be seeing something similar to this output:

which gem
#=> /Users/username/.rbenv/shims/gem
:which ruby
#=> /Users/username/.rbenv/shims/ruby
:which bundle
#=> /Users/username/.rbenv/shims/bundle

If it's different, you'll probably see that bundle or gem are running from different paths than ruby.

Thread Thread
 
s_awdesh profile image
Awdesh • Edited

That did it. Thanks for the tip.

gem and ruby paths were same but bundle. I updated the PATH for bundle gem file using BUNDLE_GEMFILE

export BUNDLE_GEMFILE=/Users/awdesh/.rbenv/shims/bundle

restarted terminal

bundle install  #worked.
Thread Thread
 
andy profile image
Andy Zhao (he/him)

Awesome! Glad to know it worked. From my experience, it's "cleaner" to reinstall your gems per version, but I'm not too sure if it matters too much.

Thread Thread
 
co16353sidak profile image

Hey, I am currently working on some night mode bugs and my work mainly works on editing scss/css files,
nevertheless I want to run a local setup of the application in an attempt to check the changes I am making.
I am having the same error as above only that dev.to required ruby version 2.6.1 but it seems to be picking up 2.3.7 from my system macOS
I have followed all the steps but to no use, I have little to no experience in ruby. could use your help in the same.

Collapse
 
jsjlewis96 profile image
Jake Lewis

Hey, I'm looking to start work on

Allow pinning of GitHub organisation projects #243

GitHub Organisation Projects

It would be great if you could pin a GitHub repo from one of your organisations, as well as your personal repositories e.g. I'd like to be able to pin this project on my profile

(on the 13th as I'm still without broadband). Is there anything I need to do outside of the stuff mentioned in getting started? Also, would this make for a decent first issue, as I'm completely new to Ruby on Rails (any good resources would also be cool). Thanks!
Collapse
 
ben profile image
Ben Halpern The DEV Team

I wouldn't say this is a particularly simple first Rails issue but since it's yours I think you have the other insight to make it happen.

Basically in the controller we have this defined:

@client = Octokit::Client.
          new(access_token: current_user.identities.where(provider: "github").last.token)

Octokit is the GitHub Ruby wrapper. It's been around a long time and is well-supported.

From here with @client, we currently call an octokit method to look up repos to display in the settings area.

@client.repositories.each do |repo|
...

I imagine to add the org repos, it'll be a matter of finding out what octokit has for that. Maybe they have a flattened way of finding all the repos, but I imagine it could be about sort of traveling up and down the object tree to get them. Hopefully it can be done efficiently.

Good luck, we can help with any bumps!

Collapse
 
maqbool profile image
Maqbool

I am getting following error I am not sure what is issue with bcrypt

BCrypt::Errors::InvalidHash in OmniauthCallbacksController#github

Collapse
 
andy profile image
Andy Zhao (he/him)

Hey, when are you hitting this error? We'll need some more context to help you debug. I'm guessing you tried signing in? If you're doing any sign in process, you'll need to setup the appropriate APIs. Instructions here: docs.dev.to/get-api-keys-dev-env/#...

Collapse
 
maqbool profile image
Maqbool

Hi Andy,

I did all the setup required by the docs and still got this error and there is a GitHub issue[1] and same error while populating the database with the initial seeds bin/setup got this error

BCrypt::Errors::InvalidHash: invalid hash

[1] github.com/codahale/bcrypt-ruby/is...

Collapse
 
peter profile image
Peter Kim Frank The DEV Team

Hey Tristan, definitely not a stupid question :)

It's probably a bit early to realistically stand up a fully self-hosted instance of DEV.

If your company is sharing technical content that is for public consumption, you're welcome to set up an organization account on the production site. You can look at Heroku as an example. You never know what might help other users.

@ben will follow up with a bit more info and context.

Collapse
 
ben profile image
Ben Halpern The DEV Team

Yeah, org accounts are the recommended way to go right now, but the instance direction is something we could start working on right away, as long as we’re willing to be patient along the way.

So that area has to be thought of as really theoretical at this point, but being an early adopter of that path could be very powerful, so you are welcome to volunteer to become part of our early group who might start thinking about that use case. Let me know if you’d like me to keep you in the loop.

Collapse
 
kreceo profile image
Darrell Lane

Hi,

I have recently been learning python, HTML5 CSS3 and now Javascript for the past 3 months, and so I am quite new to all of this, but I am incredibly driven and passionate about growing and learning new things and more.

I am also new to the community scene, therefore I was hoping someone could help me learn how I can contribute and get to know others who I can work alongside and grow with.

Thanks,

Collapse
 
kris profile image
0xAirdropfarmer • Edited

Hey guy MacOS and Ubuntu on digital ocean found this same problem

Collapse
 
andy profile image
Andy Zhao (he/him)

Hey Kris, not sure where you ran into that error. Could you provide some more details about the issue?

From a basic check, it looks like you're running into an issue with our ENV variable checker gem envied. Your application.yml should have key value pairs where the key is all capitals with no quotes and the value should have quotes, like so:

KEY: "value"
GITHUB_KEY: "somethingsomething"
# etc

Some comments may only be visible to logged-in visitors. Sign in to view all comments.