From 9f39a17e297ad5a0edc780e3af8aa98d7407d940 Mon Sep 17 00:00:00 2001 From: Luis Castro Date: Wed, 7 Aug 2019 10:27:54 +0200 Subject: [PATCH 1/4] docs(readme): remove rails 3.2 explanation --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index e63e3a43..5b5fe575 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ The Houdini Project is free and open source fundraising infrastructure. It inclu - Nonprofit org user account management - Simple donation management for donors -This is a Rails 3.2 app; [we want to upgrade](https://github.com/houdiniproject/houdini/issues/47). - Much of the business logic is in `/lib`. The frontend is written in a few custom frameworks, the largest of which is called Flimflam. From 97506ec3ab135010d1c8234d05c54c283fc93de6 Mon Sep 17 00:00:00 2001 From: Luis Castro Date: Wed, 7 Aug 2019 10:40:51 +0200 Subject: [PATCH 2/4] docs(known_issues): add a list of steps to fix pry and byebug on a local machine --- README.md | 3 +++ docs/KNOWN_ISSUES.MD | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 docs/KNOWN_ISSUES.MD diff --git a/README.md b/README.md index 5b5fe575..49105b36 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,9 @@ admin=User.find(1) #or the id of the user you want to add the role role=Role.create(user:admin,name: "super_admin") ``` +## Known Issues +For a list of [how to solve known issues](docs/KNOWN_ISSUES.MD) + ## To run in production diff --git a/docs/KNOWN_ISSUES.MD b/docs/KNOWN_ISSUES.MD new file mode 100644 index 00000000..44088a3c --- /dev/null +++ b/docs/KNOWN_ISSUES.MD @@ -0,0 +1,40 @@ +## Byebug or Pry won't start - image not found readline.bundle +---------- +```bash +pry +# Sorry, you can't use byebug without Readline. To solve this, you need to +# rebuild Ruby with Readline support. If using Ubuntu, try `sudo apt-get +# install libreadline-dev` and then reinstall your Ruby. +``` + +I use rvm to manage my ruby versions. You can use rvm to recompile ruby from source to solve the problem. There are a few other work arounds as well, but this seemed like the correct solution and it worked for me. + +Sounds like we should generally rebuild ruby as a best practice after macOS upgrades. In this case it was macOS Mojave + brew updates that triggered this new awareness for me. + +### Steps to rebuild ruby via **RVM** +It's a good idea to make sure you've installed the latest Xcode + tools before proceeding; check App Store for updates. Be sure to accept the Xcode License before proceeding! + +Update Xcode and accept the license: +* Update Xcode to latest via App Store, be sure to update the Xcode Tools as well. +* In a terminal window, exec this command: sudo xcodebuild -license accept + +Make sure you have the **readline** lib installed: + +* `brew --prefix readline` +* if you get Error: No available formula with the name "readline", install readline: + * `brew install readline` + * `brew link --force readline` You'll need to use `--force` to make it work. + * `vi ~/.rvm/user/db` and add the following: `ruby_configure_flags=--with-readline-dir=/usr/local/opt/readline` + +Reinstall Ruby, with a rebuild of sources: + +* `rvm reinstall ` This command removes the specified version's ruby binaries and libs, and rebuilds from source code on your system, with the latest macOS headers and libs. +* `rvm reinstall --gems` This command repro's the same steps as above, but it removes the gems first as well. The next time you run bundle install the gems will be downloaded and rebuilt against your latest ruby. This can help resolve other potential issues with gems after rebuilding ruby on macOS. +* Change the specified version (2.5.1 in my case) to match your needs. +* **I ended up using the second syntax for a completely fresh start.** + +#### After completing these steps I did two more things: + +Since I happened to be in a project directory in a terminal window when I started this process, I had to `cd ..` up a level and then `cd project-folder` back into my project so that RVM would reactivate my gemset. +I ran `gem install bundler` and then `bundle install` to re-hydrate the gems for my project. +and then I was good to go again. From f6d6fec9364a842a5d8d1df5f543b42f4fb1b15f Mon Sep 17 00:00:00 2001 From: Luis Castro Date: Thu, 8 Aug 2019 14:54:55 +0200 Subject: [PATCH 3/4] docs(known_issues): change the language of explanation to 3rd person --- docs/KNOWN_ISSUES.MD | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/KNOWN_ISSUES.MD b/docs/KNOWN_ISSUES.MD index 44088a3c..16de4bb3 100644 --- a/docs/KNOWN_ISSUES.MD +++ b/docs/KNOWN_ISSUES.MD @@ -1,5 +1,6 @@ ## Byebug or Pry won't start - image not found readline.bundle ---------- +Error reported. ```bash pry # Sorry, you can't use byebug without Readline. To solve this, you need to @@ -7,16 +8,16 @@ pry # install libreadline-dev` and then reinstall your Ruby. ``` -I use rvm to manage my ruby versions. You can use rvm to recompile ruby from source to solve the problem. There are a few other work arounds as well, but this seemed like the correct solution and it worked for me. +If **you use rvm to manage my ruby versions**. You can use rvm to recompile ruby from source to solve the problem. -Sounds like we should generally rebuild ruby as a best practice after macOS upgrades. In this case it was macOS Mojave + brew updates that triggered this new awareness for me. +You'll need to rebuild `ruby` as a best practice after `macOS` upgrades. ### Steps to rebuild ruby via **RVM** -It's a good idea to make sure you've installed the latest Xcode + tools before proceeding; check App Store for updates. Be sure to accept the Xcode License before proceeding! +Make sure you've installed the latest Xcode + tools before proceeding; check App Store for updates. Be sure to accept the Xcode License before proceeding! Update Xcode and accept the license: * Update Xcode to latest via App Store, be sure to update the Xcode Tools as well. -* In a terminal window, exec this command: sudo xcodebuild -license accept +* In a terminal window, exec this command: `sudo xcodebuild -license accept` Make sure you have the **readline** lib installed: @@ -35,6 +36,5 @@ Reinstall Ruby, with a rebuild of sources: #### After completing these steps I did two more things: -Since I happened to be in a project directory in a terminal window when I started this process, I had to `cd ..` up a level and then `cd project-folder` back into my project so that RVM would reactivate my gemset. -I ran `gem install bundler` and then `bundle install` to re-hydrate the gems for my project. -and then I was good to go again. +If you're in the project directory running a terminal window when finished this process, You'll had to `cd ..` up a level and then `cd project-folder` back into the project so that RVM would reactivate your gemset. +Run `gem install bundler` and then `bundle install` to re-hydrate the gems for the project. From 79561913c798bcf2d049d0bfd45ae91cae9aff4c Mon Sep 17 00:00:00 2001 From: Luis Castro Date: Thu, 8 Aug 2019 14:59:10 +0200 Subject: [PATCH 4/4] docs(known_issues): add better headings and explicit answers --- docs/KNOWN_ISSUES.MD | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/KNOWN_ISSUES.MD b/docs/KNOWN_ISSUES.MD index 16de4bb3..f1aee4ea 100644 --- a/docs/KNOWN_ISSUES.MD +++ b/docs/KNOWN_ISSUES.MD @@ -7,12 +7,15 @@ pry # rebuild Ruby with Readline support. If using Ubuntu, try `sudo apt-get # install libreadline-dev` and then reinstall your Ruby. ``` +### What's the problem? +Ruby installation with gems, specifically the `readline` gem already installed on a system that had a macOS upgrade. -If **you use rvm to manage my ruby versions**. You can use rvm to recompile ruby from source to solve the problem. +### How to solve it? +If **you use `rvm` to manage your ruby versions**. You can use `rvm` to recompile ruby from source to solve the problem. -You'll need to rebuild `ruby` as a best practice after `macOS` upgrades. +_Note:_ You'll need to rebuild `ruby` as a best practice after `macOS` upgrades. -### Steps to rebuild ruby via **RVM** +#### Steps to rebuild ruby via **RVM** Make sure you've installed the latest Xcode + tools before proceeding; check App Store for updates. Be sure to accept the Xcode License before proceeding! Update Xcode and accept the license: @@ -34,7 +37,5 @@ Reinstall Ruby, with a rebuild of sources: * Change the specified version (2.5.1 in my case) to match your needs. * **I ended up using the second syntax for a completely fresh start.** -#### After completing these steps I did two more things: - -If you're in the project directory running a terminal window when finished this process, You'll had to `cd ..` up a level and then `cd project-folder` back into the project so that RVM would reactivate your gemset. +_Gotchas:_ If you're in the project directory running a terminal window when finished this process, You'll had to `cd ..` up a level and then `cd project-folder` back into the project so that RVM would reactivate your gemset. Run `gem install bundler` and then `bundle install` to re-hydrate the gems for the project.