![Install Ruby On Rails On Openbsd Install Ruby On Rails On Openbsd](https://s-media-cache-ak0.pinimg.com/236x/f1/96/f7/f196f7e80e04052d117b6d2c341f701e.jpg)
But at the same time when using ruby from your OS package manager you end up needing sudo for installing gems which is not ideal. Ruby on Rails is extremely user-friendly and a totally manageable entry point into programming and web development. However, after learning rails for a couple of days, I’m getting tired of seeing.
Install Rails on OpenBSD 5.9
1. Install Ruby |
pkg_add ruby |
- I chose 2.3.0 |
2. Install gems |
pkg_add ruby-gems |
3. Add ~/.gem/ruby/2.3/bin to PATH |
PATH='~/.gem/ruby/2.3/bin:'$PATH |
4. Install bundle |
gem23 install --user-install bundler |
5. Install nokogiri (or run into problems installing rails) |
pkg_add ruby23-nokogiri |
6. Install rails |
gem23 install --user-install rails |
7. rails23 new <projectname> - will throw an issue with nokogiri so... |
8. gem23 install --user-install nokogiri -- --use-system-libraries --with-xml2-config=/usr/local/bin/xml2-config --with-xslt-config=/usr/local/bin/xslt-config |
9. Install node.js |
pkg_add node |
10. Add node to the gemfile |
gem 'node' |
11. ??? |
12. Run bundle install to install your gems! |
bundle23 install --path=~/.gem |
13. Profit!! |
the gem install --user-install bundler puts the bundler local to the user. Adding the directory to the path allows for bundler to be used where it was installed. If you want to go a step further you can soft link /usr/local/bin/ruby23 to /usr/local/bin/ruby and do something similar with /usr/local/bin/rails23 and ~/.gem/ruby/2.4/bin/bundle(r)23. I just run the commands as they are right now. |
I also ran into an issue with therubyracer, for some reason bundle didn't find python or python2 (or something like that). Instead I used the node gem, and installed nodejs on my server. |
commented Oct 15, 2017
Was able to mostly get running on 6.1 as well. I might be misunderstanding directive 10. Added that to the gem file but bundler choked on 'node', so I'm probably putting it in the wrong place or something. |
![Install Install](/uploads/1/2/5/8/125870749/792707414.png)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment