How to Install Ruby on Rails (RoR) on Debian 10

来自linux中国网wiki
Evan讨论 | 贡献2021年8月15日 (日) 07:10的版本 →‎ins
跳到导航 跳到搜索

ins

https://guides.rubyonrails.org/getting_started.html

https://ruby-china.github.io/rails-guides/getting_started.html

Rails 入门


Ruby 教程



ubuntu 18 

apt-get install -y nodejs


## Run `sudo apt-get install -y nodejs` to install Node.js 14.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
     echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn




npm install --global yarn

sudo apt install yarn

sudo apt-get install ruby-dev zlib1g-dev liblzma-dev

gem install execjs

sudo  gem install rails


ERROR: Failed to build gem native extension



bundle install


https://guides.rubyonrails.org/getting_started.html

可能要这些教程才行 

https://www.howtoforge.com/how-to-install-ruby-on-rails-on-debian-10/

https://codepre.com/how-to-install-ruby-on-rails-ror-on-debian-10.html?__cf_chl_jschl_tk__=pmd_4d2f0227159e0ee7b6cd475fb9856b664ea22b39-1628909169-0-gqNtZGzNAg2jcnBszQXi


打不开 有错 

	 1: from /var/lib/gems/2.7.0/gems/webpacker-5.4.0/lib/webpacker/configuration.rb:95:in `load'
/var/lib/gems/2.7.0/gems/webpacker-5.4.0/lib/webpacker/configuration.rb:103:in `rescue in load': Webpacker configuration file not found /home/evan/blog/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_check_realpath_internal - /home/evan/blog/config/webpacker.yml (RuntimeError)


Webpacker configuration file not found /home/evan/blog/config/webpacker.yml. Please run rails webpacker:install


https://stackoverflow.com/questions/57891751/webpacker-configuration-file-not-found-rails-6-0-0

If you are running on Debian, this appears to be a known issue due to a bug in ruby-bundler. Check out [github.com/rails/thor/issues/721](this issue) for information and possible workarounds. – rmlockerd Jul 27 at 1:17


https://stackoverflow.com/questions/68535975/when-running-rake-rails-commands-i-get-typeerror-superclass-mismatch-for-class

see also

Installing and Configuring Ruby on Rails on Debian 10

How to Install Ruby on Rails (RoR) on Debian 10

how-to-install-ruby-on-rails-with-rvm-on-debian-8

trouble

https://stackoverflow.com/questions/57891751/webpacker-configuration-file-not-found-rails-6-0-0


https://github.com/rails/webpacker/issues/1082