Compiled Assets(编译) sudo RAILS_ENV=production bundle exec rake canvas:compile_assets 5....Database migrations(数据库迁移) sudo RAILS_ENV=production bundle exec rake db:migrate:predeploy sudo RAILS_ENV...6. Notification types(更新通知) sudo RAILS_ENV=production bundle exec rake db:load_notifications 7....意外发现 更新后发现所有的icon图标都出问题了,编译也正常,删除/var/canvas/public/dist目录,重新执行编译: sudo RAILS_ENV=production bundle exec...rake canvas:compile_assets
CentOS下配置Ruby on Rails并部署Redmine 安装准备组件 1. gcc编译环境: yum -y install gcc 2....生成密钥 rake generate_secret_token 7....初始化数据库(如果已经有数据库结构,可以忽略此部) RAILS_ENV=production rake db:migrate RAILS_ENV=production rake redmine:load_default_data.../plugin_assets sudo chmod -R 755 files log tmp public/plugin_assets 9....账号密码 ruby script/rails server webrick -e production -p 3000 // 打开浏览器 http://localhost:3000 参考 1. http
/plugins/analytics bundle update RAILS_ENV=production bundle exec rake db:migrate sudo su canvas -c..."env GEM_HOME=/var/canvas/gems RAILS_ENV=production script/rails console" Setting.set('enable_page_views...', 'cassandra') RAILS_ENV=production bundle exec rake canvas:compile_assets RAILS_ENV=production bundle...exec rake db:migrate_pageviews_to_cassandra 第5行:进入rails控制台,自己从网上找的命令进入的,script目录下没有console… 其中第一个canvas...第6行:执行第5行之后,会进入rails控制台,然后输入Setting…带命令完成后输入exit 4.
3.3.0 /srv/ ln -s /srv/redmine-3.3.0 /srv/redmine cd /srv/redmine cat >> config/database.yml <<EOF production...generate_secret_token RAILS_ENV=production bundle exec rake db:migrate #bundle exec rake redmine:load_default_data...RAILS_ENV=production REDMINE_LANG=zh bundle exec rake redmine:load_default_data mkdir -p tmp tmp/pdf...public/plugin_assets sudo chown -R redmine:redmine files log tmp public/plugin_assets sudo chmod -R...755 files log tmp public/plugin_assets bundle exec rails server webrick -e production 默认用户名与密码 login
:backup:create #使用源码安装的请用 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 备份文件会产生在...:restore RAILS_ENV=production 在本次实验中你会得到如下提示 [root@localhost gitlab]# bundle exec rake gitlab:backup...db:migrate RAILS_ENV=production sudo -u git -H bundle exec rake assets:clean assets:precompile cache...-H bundle exec rake gitlab:env:info RAILS_ENV=production 到此升级结束,我们只需再把步骤1 2走一次,即可将数据成功迁移到新服务器上。...第二请使用这个命令 sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production 大多问题系统本身都会帮你查找出来。
gitlab:shell:install[v3.3.3] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production sudo -u git...gitlab:setup RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production...gitlab:env:info RAILS_ENV=production sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production...,执行 sudo -u git -H bundle exec rake assets:clean assets:precompile REDIS_URL=unix:/var/run/redis/redis.sock...RAILS_ENV=production 最后说明一下 这个只是记一个流水账,里边可能涉及到权限之类的问题,在确保一下nginx\git互相之间是否有权限,另外用check脚本进行check,提示很友好
generate_secret_token # RAILS_ENV=production rake db:migrate # RAILS_ENV=production rake redmine:load_default_data...# mkdir -p tmp tmp/pdf public/plugin_assets # chmod -R 755 files log tmp public/plugin_assets 若是升级... RAILS_ENV=production 若有插件: # bundle exec rake redmine:plugins:migrate RAILS_ENV=production # bundle... exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production 启动服务: # cd /data/website/redmine...-3.0.0/ # ruby bin/rails server webrick -e production 也可以放入后台: # nohup ruby bin/rails server webrick
gem install rake gem install mysql2 ======================================================= 八、...generate_secret_token RAILS_ENV=production bundle exec rake db:migrate RAILS_ENV=production bundle exec...rake redmine:load_default_data #初始化数据选择zh ==================================================== 十二、...mkdir -p tmp tmp/pdf public/plugin_assets sudo chmod -R 755 files log tmp public/plugin_assets ======...============================================= 十三、开启服务 bundle exec rails server -p80 webrick -e production
ImageMagick ImageMagick-devel mod_fcgid fcgi fcgi-devel 阿里云的云主机中操作系统是CentOS 5.x,其ImageMagick版本过低,需要源码编译...rake generate_secret_token 生成数据库结构 RAILS_ENV=production rake db:migrate 填充缺省配置数据 RAILS_ENV=production...rake redmine:load_default_data Redmine将提问你选择哪种语言。...script/rails server webrick -e production 将运行WEBrick Web服务器。...环境切换到production: vim config/environment.rb 在文件开头加入下面一行: ENV['RAILS_ENV'] ||= 'production' 配置redmine虚拟主机
a http://mirrors.aliyun.com/rubygems/ # 配置阿里的源 ## 安装 $ gem install rake -v 12.0.0 $ gem install rails...session加密处理: 创建随机key对session加密,防止被篡改 $ bundle exec rake generate_secret_token 初始化数据库字段: $ RAILS_ENV...=production bundle exec rake db:migrate 冲突解决(首先确保数据库字符集为utf8mb4): # 冲突1:key太长 Mysql2::Error: Specified...数据初始化: $ RAILS_ENV=production bundle exec rake redmine:load_default_data ## 该过程会以交互形式让用户选择语言环境变量,也可以在执行该命令时直接指定环境变量...,如下: $ RAILS_ENV=production REDMINE_LANG=zh bundle exec rake redmine:load_default_data 文件系统授权: 运行Redmine
Redmine 是以 Ruby on Rails 撰写的架构,它横跨多个平台与数据库,它的设计很明显是受一些类似功能软件包的Trac所影响。...cd /usr/local/redmine gem install bundler bundle install rake generate_secret_token 初始化数据库 RAILS_ENV...=production rake db:migrate # 生成表结构 RAILS_ENV=production rake redmine:load_default_data # 初始化数据并选择zh...设置文件权限 cd /usr/local/redmine chown -R 755 files log tmp public/plugin_assets 启动 bundle exec rails server...0.0.0.0 -p 80 webrick -e production -d # 参数-p指定端口,不加-p默认端口为3000 访问 http://ip:3000 默认账号密码:admin/admin
", __FILE__) shared_dir = "#{app_dir}/shared" # Default to production rails_env = ENV['RAILS_ENV']...|| "production" environment rails_env # Set up socket location bind "unix://#{shared_dir}/sockets/puma.sock...sample output:29cc5419f6b0ee6b03b717392c28f5869eff0d136d8ae388c68424c6e5dbe52c1afea8fbec305b057f4b071db1646473c1f9a62f803ab8386456ad3b29b14b89...db:create rake db:migrate rake assets:precompile sudo restart puma-manager...如果保持原样,服务器将尝试对应用程序的生产环境执行以下操作: 运行bundler 创建数据库 迁移数据库 预编译资产 重启Puma 重启Nginx 如果您想进行任何更改或添加错误检查,请随时在此处执行此操作
gitlab:shell:install[v1.9.4] REDIS_URL=redis://localhost:6379 RAILS_ENV=production 打开GitLab shell配置文件...gitlab:setup RAILS_ENV=production 该命令将显示以下消息 This will create the necessary database tables and seed...gitlab:env:info RAILS_ENV=production 样本输出 System information System: Ubuntu 14.04 Current...: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production 为git用户配置全局属性: sudo -u git...在浏览器上打开GitLab 再次检查应用的运行状态: cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:check RAILS_ENV
It ships with all the tools needed to build amazing web apps on both the front and back end.在 Rails 6...中有两种不同的工具可以用来管理前端的 CSS、JavaScript 以及 images 等资源,分别是 “Sprockets” 和 “Webpacker”,“Sprockets” 除了 Rails 应用外很少使用...,但是 “Webpacker” 不仅在 Rails 中,在其他应用框架中也被广泛的使用。...在 Rails 7 中静态资源的管理已经从 “Webpacker” 改为了 “Import Maps”,用来简化基于 JavaScript 的工具和包管理器 Webpack、Yarn 或者 npm 的使用...中添加内容:Rails.application.config.assets.precompile += %w( jquery3.min.js jquery\_ujs.js bootstrap.min.js
在 Rails 6 中有两种不同的工具可以用来管理前端的 CSS、JavaScript 以及 images 等资源,分别是 “Sprockets” 和 “Webpacker”,“Sprockets” 除了...Rails 应用外很少使用,但是 “Webpacker” 不仅在 Rails 中,在其他应用框架中也被广泛的使用。...在 Rails 7 中静态资源的管理已经从 “Webpacker” 改为了 “Import Maps”,用来简化基于 JavaScript 的工具和包管理器 Webpack、Yarn 或者 npm 的使用...# 更改文件后缀为 scss mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss 增加内容...中添加内容: Rails.application.config.assets.precompile += %w( jquery3.min.js jquery_ujs.js bootstrap.min.js
# 退出数据库会话 gitlabhq_production> \q 6.Redis sudo apt-get install redis-server # 配置redis使用socket来监听 sudo...gitlab:shell:install[v2.6.6] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production # 默认情况下,...sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=yourpassword 安全设置...gitlab:env:info RAILS_ENV=production 生成资源(Assets): sudo -u git -H bundle exec rake assets:precompile...RAILS_ENV=production 启动Gitlab实例: sudo service gitlab start # or sudo /etc/init.d/gitlab restart
actionview (4.2.6) activejob (4.2.6) ... ... rdoc (4.2.1) rvm (1.11.3.9) sprockets (3.6.0) sprockets-rails...3.0.4) test-unit (3.1.5) thor (0.19.1) thread_safe (0.3.5) tzinfo (1.2.2) [root@h202 ruby]# ---- 创建 Rails...程序 我们创建一个叫 blog 的项目 [root@h202 ruby]# rails new blog create create README.rdoc...config/environments create config/environments/development.rb create config/environments/production.rb...Make sure that `gem install rake -v '11.1.2'` succeeds before bundling.
create bin/rake create config create config/routes.rb create config/application.rb create...create config/environments create config/environments/development.rb create config/environments/production.rb...create vendor/assets/javascripts create vendor/assets/javascripts/.keep create vendor/assets...Using rake (10.3.1) Using i18n (0.6.9) Using minitest (4.7.5) Using multi_json (1.9.2) Using...app/assets/stylesheets/welcome.css.scss 在config/routes.rb加入�默认页面 root 'welcome#index' 再执行 rails server
. ---- Rails 的目录结构 [root@h202 blog]# tree . ├── app │ ├── assets │ │ ├── images │ │ ├── javascripts...└── views │ └── layouts │ └── application.html.erb ├── bin │ ├── bundle │ ├── rails...│ ├── rake │ └── setup ├── config │ ├── application.rb │ ├── boot.rb │ ├── database.yml │...├── environment.rb │ ├── environments │ │ ├── development.rb │ │ ├── production.rb │ │...└── test.rb │ ├── initializers │ │ ├── assets.rb │ │ ├── backtrace_silencers.rb │ │ ├──
创建生产数据库 既然您的应用程序已配置为可以与PostgreSQL数据库通信,那么让我们创建生产数据库: RAILS_ENV=production rake db:create 生成控制器 如果您跟随示例...=production rake db:migrate 预编译资产 此时,应用程序应该可以工作,但您需要预编译其资产,以便该程序可以加载任何图像,CSS和脚本。...为此,请运行以下命令: RAILS_ENV=production rake assets:precompile 测试应用 要测试您的应用程序是否有效,您可以运行生产环境,并将其绑定到服务器的公共IP地址...(替换服务器的公共IP地址): RAILS_ENV=production rails server --binding=server_public_IP 现在,在Web浏览器中访问此URL: http:...Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6
领取专属 10元无门槛券
手把手带您无忧上云