😓我已经删掉了,重新建了个用户😄
@mueven 确定是因为 nobody 对 app 没有权限导致这个问题的吗吗?
@amanda_meng 对的,我用 root 运行的 bundle install,还提示过不要用 root 账户,否则其他用户不能使用 gem 看到 nginx worker processer 用户是 nobody 如果继续使用 root 用户还有什么办法呢?
@rei 再次感谢,bundle install 后跑起来了😄 最后一个小问题 gem list 怎么看到的只有(bundle 安装的没有列出来)
*** LOCAL GEMS ***
bigdecimal (1.2.6)
bundle (0.0.1)
bundler (1.10.6)
io-console (0.4.3)
json (1.8.1)
lumberjack (1.0.9)
mini_portile (0.6.2)
minitest (5.4.3)
nokogiri (1.6.6.2)
power_assert (0.2.2)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
test-unit (3.0.8)
bundle 也有两个,不知道执行 bundle install 有没有影响
bunle:[vagrant@localhost Internal]$ whereis bundle
bundle: /home/vagrant/.rbenv/shims/bundle /home/vagrant/bin/bundle
系统自带的 2.0.0,我用 rvm 安装 2.2 失败(提取文件有错误),就自己下载 ruby2.2.2 编译安装了,然后就出现上边的问题了 现在改用 rbenv 还是上边的问题,大概是什么原因呢?
感谢 @rei 之前配置的是系统自带的 ruby(/usr/bin/ruby),改为 rvenv 安装的 ruby 后提示 bundle install 了😄
It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:
bundle install
有点疑问,passenger 是从哪里加载 gems 的呢?另外我查看 bundle(bin)也有两个
cannot load such file -- bundler/setup (LoadError)
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/vagrant/.gem/ruby/gems/passenger-5.0.15/lib/phusion_passenger/loader_shared_helpers.rb:406:in `activate_gem'
/home/vagrant/.gem/ruby/gems/passenger-5.0.15/lib/phusion_passenger/loader_shared_helpers.rb:288:in `block in run_load_path_setup_code'
/home/vagrant/.gem/ruby/gems/passenger-5.0.15/lib/phusion_passenger/loader_shared_helpers.rb:411:in `running_bundler'
/home/vagrant/.gem/ruby/gems/passenger-5.0.15/lib/phusion_passenger/loader_shared_helpers.rb:287:in `run_load_path_setup_code'
/home/vagrant/.gem/ruby/gems/passenger-5.0.15/helper-scripts/rack-preloader.rb:99:in `preload_app'
/home/vagrant/.gem/ruby/gems/passenger-5.0.15/helper-scripts/rack-preloader.rb:153:in `<module:App>'
/home/vagrant/.gem/ruby/gems/passenger-5.0.15/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/home/vagrant/.gem/ruby/gems/passenger-5.0.15/helper-scripts/rack-preloader.rb:28:in `<main>'
@rei
[vagrant@localhost ruby]$ bundle config path
Settings for path
in order of priority. The top value will be used
You have not configured a value for path
是 passenger 认为的 gems path 根 bundle install gempath 不同到导致出错的吗??
@rei
写了个启动脚本,可以启动 vagrant 了,下边提示时 NFS 挂在成功还是失败了?怎么最后是“Mounting shared folders...”
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
The nfsd service does not appear to be running.
Starting the nfsd service
==> default: Mounting NFS shared folders...
==> default: Mounting shared folders...
default: /vagrant => /Users/Nelson/VPS/CentOS
==> default: Machine already provisioned. Run vagrant provision
or use the --provision
==> default: flag to force provisioning. Provisioners marked to run always will still run.
config.vm.network :private_network, ip: "192.168.11.189"
config.vm.synced_folder "~/", "/home/vagrant/Repo" , :nfs => true
$vagrant reload
The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!
/etc/init.d/rpcbind restart; /etc/init.d/nfs restart
Stdout from the command:
Stderr from the command:
bash: Zeile 2: /etc/init.d/rpcbind: Datei oder Verzeichnis nicht gefunden bash: Zeile 2: /etc/init.d/nfs: Datei oder Verzeichnis nicht gefunden
** CentOS7.1,/etc/init.d/下是没有 nfs 跟 rpcbind,执行 service nfs/rpcbind restart 是有效的 ** ** 这里怎么制作 init.d 启动项,或怎么修改 vagrant 为 service * restart **
@rei 还有什么其他建议可已提速的?
@rei 用 NFS 会快吗?
@eaccent php3 年刚入 rails 一两个月,收留否?
@xds2000 这个很困难啊,这个数据库支撑着多套程序,有 delphi 和 c#,担心盲目升级带来 ERP 等系统问题
The SQL Server adapter for ActiveRecord. If you need the adapter for SQL Server 2000, you are still in the right spot. Just install the latest 2.3.x version of the adapter. Note, we follow a rational versioning policy that tracks ActiveRecord. That means that our 2.3.x version of the adapter is only for the latest 2.3 version of Rails. We also have stable branches for each major/minor release of ActiveRecord.
难道非要用 Rails2.3 + activerecord-sqlserver-adapter2.3.x 才能符合 sqlserver2000??
@taomaree 是的 tiny_ids 我刚装完可以实现,但还需要 activerecord-sqlserver-adapter 才能适配 activerecord,可 activerecord-sqlserver-adapter 貌似 3..不支持 Rails4 和 SQLServer2000, 查到
gem 'activerecord-sqlserver-adapter', git: '[email protected]:nextgearcapital/activerecord-sqlserver-adapter.git', :branch => "rails-4"
安装完成(Rails4.0.2),现在问题是恐怕其不支持 sqlserver2000
@xds2000 sqlserver 2000 是否最高只能用 gem "activerecord-sqlserver-adapter", "~> 2.3.24" 另外 activerecord-sqlserver-adapter2.3.24 是否支持 Rails4.0.2 ?
respond_to do |format|
format.json { render :json => {:success => true, :html => (render_to_string 'attachs/carousel.html.erb', layout: false)} }
format.html { }
end
上边段从 stackoverflow 找到的,加上 layout:false 没有影响
@mystery 你贴的如何传递 opts 给 render_cell
format.js { render_cell: 'html', :var1 => var1, layout: false }
is this OK?
@mystery 这样会把完整的 html 返回(包括 header,footer),我只想要render_cell: 'html'
里的
安装 bootstrap-sass (3.1.1.0)
$bundle update bootstrap-sass
Bundler could not find compatible versions for gem "bootstrap-sass": In Gemfile: api_taster (= 0.6.0) ruby depends on bootstrap-sass (~> 2.1) ruby bootstrap-sass (3.1.1.0)
@huacnlee 如你所说
只是把 bootstrap js 分类引入了吗?css 用的 app 下的?
@WaterFlowsEast 用 Docsplit 转 ppt 为 images 时,中文乱码,是什么原因呢?是否 libreoffice 打开 ppt 中文就是乱码
重启了几次 sidekiq,问题解决了
2014-02-19T02:36:34Z 8146 TID-41nw0 INFO: Shutting down 2014-02-19T02:36:34Z 8146 TID-uifaw INFO: Shutting down 25 quiet workers
25 quiet workers
为什么监控里 workers list 没有显示?
没有啊,我是在前台运行的(开发环境),一直监控着变化 @huacnlee