• 在 ruby 社区看到 go 的 gorm,厉害了

  • 厉害了

  • 👍

  • Rails 6.0 正式发布 at 2019年08月19日

    👍 👍 👍 👍

  • 厉害了

  • 工作机会越来越少了哦

  • 现在都是一个项目两组方案并存的使用

  • 一如既往的精彩👍 👍 👍 👍 👍

  • 谢谢

  • 买票支持

  • mina 是 delpoy.rb 文件

  • 首先需要 gem ' mina-sidekiq',再你的 deploy.rb 文件下需要 require 'mina-sidekiq'和 require 'puma'

    require 'mina/multistage'
    require 'mina/bundler'
    require 'mina/rails'
    require 'mina/git'
    require 'mina/rbenv'  # for rbenv support. (http://rbenv.org)
    #require 'mina/rvm'    # for rvm support. (http://rvm.io)
    require 'mina/unicorn'
    require 'mina/logs'
    require 'mina_sidekiq/tasks'
    
  • 2015 年还在大学中😂 什么时候再来一次啊

  • 似乎没有在深圳举办过啊

  • Rails 管理多数据库 at 2019年06月16日

    使用了 Apartment 这个包进行管理,使用了 Apartment-sidekiq 进行了 sidekiq 进行管理

  • mina 自动化部署出现错误 at 2019年05月17日

    是不是没有生成 public/upload 共赏文件夹

    set :shared_dirs, fetch(:shared_dirs, []).push('tmp', 'log', 'public/uploads','public/packs','storage')
    set :shared_files, fetch(:shared_files, []).push('config/database.yml', 'config/master.key','config/webpacker.yml')
    
    
  • 大赞,

  • Mac 环境下安装 mysql2 报错 at 2019年04月28日

    好的。已经搞定了。是配置的问题

  • Mac 环境下安装 mysql2 报错 at 2019年04月26日

    好的

  • Mac 环境下安装 mysql2 报错 at 2019年04月26日

    能否给个帖子,这边没有收到

  • Mac 环境下安装 mysql2 报错 at 2019年04月25日

    可以进入到 mysql 的,其他 gem 都可以正常安装,就是 gem mysql2 无法使用

  • 能翻译下就更好了

  • 我也遇到同样的问题,但是我的 staging 静态资源配置和你配置的一样,使用 mina 部署时第一次访问还是很慢

  • Capistrano 部署问题 at 2018年10月27日
    before "deploy:assets:precompile", "deploy:yarn_install"
    
    namespace :deploy do
      desc "Make sure local git is in sync with remote."
      task :check_revision do
        on roles(:app) do
          unless `git rev-parse HEAD` == `git rev-parse origin/erp_production`
            puts "WARNING: HEAD is not the same as origin/erp_production"
            puts "Run `git push` to sync changes."
            exit
          end
        end
      end
      desc 'Run rake yarn:install'
      task :yarn_install do
        on roles(:app) do
          within release_path do
            execute("cd #{release_path} && yarn install")
          end
        end
      end
      desc 'Initial Deploy'
      task :initial do
        on roles(:app) do
          before 'deploy:restart', 'puma:start'
          invoke 'deploy'
        end
      end
    
      desc 'Restart application'
      task :restart do
        on roles(:app), in: :sequence, wait: 5 do
          invoke 'puma:restart'
        end
      end
    
      desc "Create linked_files"
      task :setup do
        on roles(:app) do
          execute "touch #{shared_path}/config/database.yml"
          execute "touch #{shared_path}/config/master.key"
          execute "touch #{shared_path}/config/webpacker.yml"
        end
      end
    
    
      before :starting, :check_revision
      after :finishing, :compile_assets
      after :finishing, :cleanup
      after :finishing, :restart
    end
    

    使用 cap production deploy 一直提示 webpack 无法 install

  • Capistrano 部署问题 at 2018年10月27日

    用的是 rbenv,好的,我试下。谢谢

  • Capistrano 部署问题 at 2018年10月26日

    capfile 配置

    # Load DSL and set up stages
    require "capistrano/setup"
    
    # Include default deployment tasks
    require "capistrano/deploy"
    
    # Load the SCM plugin appropriate to your project:
    #
    # require "capistrano/scm/hg"
    # install_plugin Capistrano::SCM::Hg
    # or
    # require "capistrano/scm/svn"
    # install_plugin Capistrano::SCM::Svn
    # or
    require "capistrano/scm/git"
    install_plugin Capistrano::SCM::Git
    
    # Include tasks from other gems included in your Gemfile
    #
    # For documentation on these, see for example:
    #
    #   https://github.com/capistrano/rvm
    #   https://github.com/capistrano/rbenv
    #   https://github.com/capistrano/chruby
    #   https://github.com/capistrano/bundler
    #   https://github.com/capistrano/rails
    #   https://github.com/capistrano/passenger
    #
    require "capistrano/rvm"
    require "capistrano/rbenv"
    # require "capistrano/chruby"
    require "capistrano/bundler"
    require "capistrano/rails/assets"
    require "capistrano/rails/migrations"
    # require "capistrano/passenger"
    require 'capistrano/puma'
    # require 'capistrano/sidekiq'
    # require 'capistrano/sidekiq/monit'
    
    # Load custom tasks from `lib/capistrano/tasks` if you have any defined
    
    
    Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
    ```ruby
    
     执行cap production deploy
    ```shell
        12 chuck@ys1.youtulink.com 0.076s
          13 ln -s /home/chuck/youerp_production/shared/public/storage /home/chuck/youerp_production/releases/20181026102931/public/storage
        ✔ 13 [email protected] 0.078s
    00:07 bundler:install
          01 $HOME/.rbenv/bin/rbenv exec ~/.rvm/bin/rvm default do bundle install --path /home/chuck/youerp_production/shared/bundle --without development test --deployment
          01 rbenv: /home/chuck/.rvm/bin/rvm: command not found
          01
    #<Thread:0x000055778c9ef828@/home/taotao/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.18.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
    Traceback (most recent call last):
        1: from /home/taotao/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.18.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
    /home/taotao/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.18.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing on host ys1.youtulink.com: bundle exit status: 127 (SSHKit::Runner::ExecuteError)
    bundle stdout: rbenv: /home/chuck/.rvm/bin/rvm: command not found
    bundle stderr: Nothing written
    (Backtrace restricted to imported tasks)
    cap aborted!
    SSHKit::Runner::ExecuteError: Exception while executing on host ys1.youtulink.com: bundle exit status: 127
    bundle stdout: rbenv: /home/chuck/.rvm/bin/rvm: command not found
    bundle stderr: Nothing written
    
    
    Caused by:
    SSHKit::Command::Failed: bundle exit status: 127
    bundle stdout: rbenv: /home/chuck/.rvm/bin/rvm: command not found
    bundle stderr: Nothing written
    
    Tasks: TOP => deploy:updated => bundler:install
    (See full trace by running task with --trace)
    The deploy has failed with an error: Exception while executing on host ys1.youtulink.com: bundle exit status: 127
    bundle stdout: rbenv: /home/chuck/.rvm/bin/rvm: command not found
    bundle stderr: Nothing written
    
    
    ** DEPLOY FAILED
    ** Refer to log/capistrano.log for details. Here are the last 20 lines:
    
    
    

    不知道什么原因

  • Capistrano 部署问题 at 2018年10月26日

    无法 bundle install

  • Rails 管理多数据库 at 2018年08月29日

    谢谢您的分享。这个 gem 我看过。之前一直没有用过这个包,最近也在学习这个包

  • Rails 管理多数据库 at 2018年08月28日

    谢谢分享,我们这个小型项目。是没有做前后端分离的。我之前也是通过分支管理。但现在维护起来不容易。每个分支都需要单独去维护

  • Rails 管理多数据库 at 2018年08月28日

    谢谢分享