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 ❤️

Top comments (109)

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
 
sleeve profile image
Steve Morris

I don't have a ton of ruby experience so I actually ran into what I thought was a problem installing ruby with rbenv. I just wanted to share my experience here in case others run into the same issue.

I started by installing rbenv with homebrew.

~ $ brew install rbenv

No issues, cool. Then I went to install the current ruby version of 2.6.1 in rbenv but it kept hanging on the following line.

~ $ rbenv install 2.6.1
ruby-build: use openssl from homebrew
Downloading ruby-2.6.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.1.tar.bz2
Installing ruby-2.6.1...
ruby-build: use readline from homebrew

I kept canceling out of it thinking it was stuck but it was actually building in the background. The installer could use some work giving users some sort of visual feedback that it's actually building. I looked it up and stumbled on to a GitHub issue about it: github.com/rbenv/ruby-build/issues...

One of the comments mentioned that you can actually use the install -v flag when installing with rbenv to get a verbose output of the build process in your terminal. I then ran the following:

~ $ rbenv install -v 2.6.1

And no more hanging on readline! It will fill your terminal window with build logs but at least you know it's working.

Hope this helps someone!

Collapse
 
andy profile image
Andy Zhao (he/him)

Great tip, thanks!

Collapse
 
cathodion profile image
Dustin King • Edited

Here's something I ran into as I'm going through the setup instructions, in case anyone else has the same problem.

When I did gem install bundler, I got this error message:

Fetching: bundler-1.16.5.gem (100%)
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

It might have occurred because I uninstalled rvm (using rvm implode ) after installing rbenv.

The fix (found here ) was to add eval "$(rbenv init -)" to my .bash_profile (then do source ~/.bash_profile). After that gem install bundler worked.

Collapse
 
andy profile image
Andy Zhao (he/him)

Awesome, thanks for sharing!

Collapse
 
m760622 profile image
Mohammed Abunada

I found the solution in this site
usabilityetc.com/articles/ruby-on-...

Collapse
 
belverus profile image
Belverus

I can't explain how helpful this is. You saved me from a great amount of trouble. Thank you!

Collapse
 
peter profile image
Peter Kim Frank

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

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
 
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
 
stephaniekyyip profile image
Stephanie

I'm getting the following error when running bin/setup:

== Preparing database ==
rails aborted!
The following environment variables should be set: ALGOLIASEARCH_API_KEY, ALGOLIASEARCH_APPLICATION_ID, ALGOLIASEARCH_SEARCH_ONLY_KEY.
/usr/local/lib/ruby/gems/2.5.0/gems/envied-0.9.1/lib/envied.rb:38:in `error_on_missing_variables!'
/usr/local/lib/ruby/gems/2.5.0/gems/envied-0.9.1/lib/envied.rb:19:in `require'
/Users/Stephanie/Documents/Github/dev.to/config/application.rb:12:in `<top (required)>'
/Users/Stephanie/Documents/Github/dev.to/Rakefile:4:in `require'
/Users/Stephanie/Documents/Github/dev.to/Rakefile:4:in `<top (required)>'
/usr/local/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
/usr/local/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/usr/local/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command.rb:46:in `invoke'
/usr/local/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
/Users/Stephanie/Documents/Github/dev.to/bin/rails:9:in `require'
/Users/Stephanie/Documents/Github/dev.to/bin/rails:9:in `<top (required)>'
/usr/local/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/usr/local/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/usr/local/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/usr/local/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/usr/local/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/usr/local/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/Users/Stephanie/Documents/Github/dev.to/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
(See full trace by running task with --trace)

== Command ["bin/rails db:setup"] failed ==

But I already added the Algolia keys to config/application.yml:

ALGOLIASEARCH_API_KEY: "myKey"
ALGOLIASEARCH_APPLICATION_ID: "myKey"
ALGOLIASEARCH_SEARCH_ONLY_KEY: "myKey"

It seems like the ENV variables aren't being set, despite changing application.yml. I'm not sure what I'm missing.

Collapse
 
andy profile image
Andy Zhao (he/him)

Hm that's strange. Try these two things:

  1. You're probably doing this correctly already, but make sure you're setting the keys in config/application.yml and not sample_application.yml.
  2. You might be running into a spring error, which is a Rails app preloader. If spring is running, it'll run bin commands for you, but sometimes doesn't refresh when you change things like environment variables. Try turning it off with spring stop and then running bin/setup again.
Collapse
 
stephaniekyyip profile image
Stephanie

Spring wasn't actually running, but I figured out what the issue was.

When I ran git status, it seemed like I accidentally made some changes to config/application.rb. I undid those changes and now bin/setup works.

Thanks for trying to help though!

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

Great! Glad it's resolved :)

Collapse
 
delbetu profile image
M Bellucci • Edited

Hello everyone!
I'm trying to write specs for login/signup procedure.
I've inspected the code and came out with these potential scenarios.
Can someone help me to correct, validate, refine these scenarios to met the reality?
(I follow the format ---> )

1 User never login before

create new user
create new identity
update user data
create session
go to welcome page

2 User second login with same provider

find existing user
find existing identity
update user data
create session
go to dashboard

3 User second login with other provider

find existing user
create new identity
update user data
create session
go to dashboard

4 User revoked authorization on twitter, login and re-authorizes

find existing user
find existing identity
update user data
create session
go to dashboard
Error cases ——

5 Twitter doesn’t provide enough information for the user (let’s say uid is nil)

don't create session
go to back to same page
display error message Twitter authorization problem. Try again later

Collapse
 
andy profile image
Andy Zhao (he/him)

Yep, that sounds right. We have a feature test for Twitter auth /spec/features/user_logs_in_with_twitter_spec.rb and some other tests for registration in spec/models/user_spec.rb#270. Those should be helpful for see what else would need coverage.

Collapse
 
delbetu profile image
M Bellucci

Awesome thanks I'll take a look.

Collapse
 
delbetu profile image
M Bellucci

@ben ^ ?

Collapse
 
ben profile image
Ben Halpern

That seems like the right path. @andy can provide more thoughts

Collapse
 
carlymho profile image
Carly Ho 🌈

Hello! I was successfully able to run bin/setup and bin/startup does work and spin up the server, but when I go to the localhost port it tells me, I get a Cannot GET / error. All routes seem to be doing this. Anyone had this problem before? Do I need to input any keys above and beyond the Algolia ones to get the base site to work?

Collapse
 
andy profile image
Andy Zhao (he/him)

Hmm, not sure what that's about. Do you have another server that's connected to localhost:3000? Although if you do, you wouldn't have been able to start up the server.

Could you drop a screenshot of the browser on localhost:3000 and maybe a snippet of the server logs?

Collapse
 
andy profile image
Andy Zhao (he/him) • Edited

OH I think I know what it is. You might have went to localhost:3035 which is running Webpack. It might not be exactly 3035, but it's something similar and is not localhost:3000. localhost:3000 is the port for the backend Rails server, which is the one you want to visit.

Thread Thread
 
carlymho profile image
Carly Ho 🌈

Also, now that I've got it set up, props to whoever on your team likes this book:
to say nothing of the dog

Collapse
 
carlymho profile image
Carly Ho 🌈

oh wait, there we go! I think I did have something else running on 3000—not surprising, since I am always running like five development servers, but I should have double-checked that port was open. Thanks!

Collapse
 
jibrankalia profile image
Jibran Kalia • Edited

When running bin/setup I get the following error:

"2/8 Creating Users"
rails aborted!
Algolia::AlgoliaProtocolError: Cannot reach any host: getaddrinfo: nodename nor servname provided, or not known (1916c2b24231d12082a54f9c2f29efa2.algolia.net:443), getaddrinfo: nodename nor servname provided, or not known (1916c2b24231d12082a54f9c2f29efa2-1.algolianet.com:443), getaddrinfo: nodename nor servname provided, or not known (1916c2b24231d12082a54f9c2f29efa2-2.algolianet.com:443), getaddrinfo: nodename nor servname provided, or not known (1916c2b24231d12082a54f9c2f29efa2-3.algolianet.com:443)
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/algoliasearch-1.19.1/lib/algolia/client.rb:417:in `request'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/algoliasearch-1.19.1/lib/algolia/client.rb:429:in `put'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/algoliasearch-1.19.1/lib/algolia/index.rb:516:in `set_settings'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/algoliasearch-rails-1.20.4/lib/algoliasearch-rails.rb:286:in `block (3 levels) in <class:SafeIndex>'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/algoliasearch-rails-1.20.4/lib/algoliasearch-rails.rb:321:in `log_or_throw'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/algoliasearch-rails-1.20.4/lib/algoliasearch-rails.rb:285:in `block (2 levels) in <class:SafeIndex>'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/algoliasearch-rails-1.20.4/lib/algoliasearch-rails.rb:752:in `algolia_ensure_init'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/algoliasearch-rails-1.20.4/lib/algoliasearch-rails.rb:595:in `block in algolia_clear_index!'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/algoliasearch-rails-1.20.4/lib/algoliasearch-rails.rb:593:in `each'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/algoliasearch-rails-1.20.4/lib/algoliasearch-rails.rb:593:in `algolia_clear_index!'
/Users/jibrankalia/side/dev.to/db/seeds.rb:26:in `<top (required)>'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `load'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `block in load'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `load'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/railties-5.1.6/lib/rails/engine.rb:549:in `load_seed'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/activerecord-5.1.6/lib/active_record/tasks/database_tasks.rb:270:in `load_seed'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/activerecord-5.1.6/lib/active_record/railties/databases.rake:184:in `block (2 levels) in <top (required)>'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/airbrake-5.8.1/lib/airbrake/rake/task_ext.rb:19:in `execute'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/railties-5.1.6/lib/rails/command.rb:46:in `invoke'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
/Users/jibrankalia/side/dev.to/bin/rails:9:in `require'
/Users/jibrankalia/side/dev.to/bin/rails:9:in `<top (required)>'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/Users/jibrankalia/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/Users/jibrankalia/side/dev.to/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Tasks: TOP => db:setup => db:seed

Not sure what to do from here.

Collapse
 
andy profile image
Andy Zhao (he/him)

Hey Jibran, looks like you have some error with Algolia. You'll need Algolia API keys in order to run the local server on your machine. See our guide here on how to get it: docs.dev.to/get-api-keys-dev-env/

Collapse
 
jibrankalia profile image
Jibran Kalia

Hey Andy,

Got it to work. Silly setup error on my part. Thanks!

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

Gotcha :) Glad it's working!

Collapse
 
shell_brien profile image
Michelle Brien • Edited

Hello,

Trying to setup locally on my machine but running into an error after running bin/setup

"1/8 Creating Organizations"
"2/8 Creating Users"
rails aborted!
ActiveRecord::RecordInvalid: Validation failed: Profile image could not download file: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)

Has anyone else come across this before as finding it tricky to debug?

The console also throws this error at end of log

== Command ["bin/rails db:setup"] failed ==

So seems like db issues.. is there anything specific I need to do to set this up? I've just been following the installation steps where it only mentions to have postgresql 9.4 or higher (which I have)

Thanks for any help in advance!

Collapse
 
andy profile image
Andy Zhao (he/him) • Edited

Oh that's a strange error. I can't seem to reproduce it, but I think it might be something with the profile_image_url we're using. It's currently randomly generated by a gem, but feel free to replace it with any other valid image. The only non-standard validation we have for images is that its dimensions have to be less than or equal to 4096x4096.

You can replace line #31 in the seeds.rb file with any URL you'd like:

# current version
remote_profile_image_url: Faker::Avatar.image(nil, "300x300", "png", "set2", "bg2")

# change to anything, like your own dev.to profile pic:
remote_profile_image_url: "https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/104515/87d99338-e340-4642-8393-e3731deb5b97.jpg"

# or use random Bill Murray images with 400x400 size:
remote_profile_image_url: Faker::Fillmurray.image(false, 400, 400)

Faker::Fillmurray docs here, if you're so inclined. 😇

Collapse
 
shell_brien profile image
Michelle Brien

Thank you!

Yes that was it, I've now been able to get running using my own profile pic. As happy as I am that it's working now am quite sad I've not been able to use the Bill Murray Faker... 😂

For info I was getting a 'redirect' error

ActiveRecord::RecordInvalid: Validation failed: Profile avatar could not download file: redirection forbidden:

...which seemed like it was expecting https in the url, but I couldn't find an easy way to resolve this.

But all good with a non-Faker url for the profile image 👍

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

Awesome, glad it worked! Unfortunate about Bill Murray 🙃

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
 
ben profile image
Ben Halpern

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

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
 
cathodion profile image
Dustin King • Edited

I've got it running but I get a 401 unauthorized when I try to log in (using the Twitter button).

A page showing login buttons

An error page showing OAuth::Unauthorized

I'm looking to play around with editing posts and comments to look into the stale post/comment issue I've run into (maybe the same as #526, though I haven't had it give me a 404 ), which might require looking into caching stuff.

Collapse
 
andy profile image
Andy Zhao (he/him)

Hmm, did you set up your Twitter OAuth app? Guide here: docs.dev.to/get-api-keys-dev-env/#...

Collapse
 
cathodion profile image
Dustin King

Thanks, I must have skipped that one. I'm now waiting to hear back from Twitter about my applicaiton for an API account.

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

Oh hmm that must be new. If you'd rather, you can make a GitHub OAuth app instead. For sign in purposes they're the same.

Collapse
 
tam360 profile image
Mirza

Hey @ben , it's my first time contribution to any open source project. I am trying to setup the project on my machine (rails version 5.2.1) but schema migrations are causing some trouble. Here take a look:

migration issue

Collapse
 
andy profile image
Andy Zhao (he/him)

Hey @mirza, that's a current bug with the migrations since our older migrations are not forward-compatible right now. Since you're setting up for the first time, we recommend using bin/setup to setup your database from scratch. If you've setup your database already with rails db:create or rake db:create (same command), you'll need to drop it first with rails db:drop before running bin/setup.

Collapse
 
tam360 profile image
Mirza

i followed your suggestion and its now working. thanks mate! any advise for a rookie OSS contributor?

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

Glad it works! You can check out our issues page and work on any issues with the approved label. There should be enough context in the issue or the comments to get started. Any issues with "good first issue" is also a good start.

For OSS in general, I personally don't have much advice but that's how repo works. We try to adhere to similar standards that the OSS community has, and any feedback along the way will certainly be heard!

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