macos 10.15安装ruby 3
摘要:brew install rbenv/tap/openssl@1.0 RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)" CC=/usr/bin/gcc rbenv install 3.0.2
阅读全文
posted @
2021-11-08 12:07
c3tc3tc3t
阅读(132)
推荐(0)
rails6 导入js依赖库css样式
摘要:If you have upgraded your app from an earlier version of Rails make sure you add the following line: Rails.application.config.assets.paths << Rails.ro
阅读全文
posted @
2020-06-05 13:47
c3tc3tc3t
阅读(321)
推荐(0)
常用gem
摘要:rails_db better_errors awesome_print web-console irbtools binding_of_caller awesome_rails_console
阅读全文
posted @
2019-08-22 08:53
c3tc3tc3t
阅读(137)
推荐(0)
upgrade rubygems
摘要:1 gem install rubygems-update 2 update_rubygems 3 gem update --system 4 gem update
阅读全文
posted @
2019-08-21 09:24
c3tc3tc3t
阅读(159)
推荐(0)
rubymine debug需要安装依赖
摘要:for ruby2.xgem install ruby-debug-ide --pre gem install debase --pregem install debugger2 --pre
阅读全文
posted @
2018-12-21 08:31
c3tc3tc3t
阅读(675)
推荐(0)
warning: already initialized constant FileUtils::VERSION
摘要:Ran into this, and the solution here works: https://stackoverflow.com/questions/51334732/rails-5-2-0-with-ruby-2-5-1-console-warning-already-initializ
阅读全文
posted @
2018-11-26 12:47
c3tc3tc3t
阅读(578)
推荐(0)
rails 5.2 启动警告 warning: previous definition of VERSION was here和bootsnap
摘要:bootsnap依赖问题 or or warning: previous definition of VERSION was here
阅读全文
posted @
2018-11-08 15:25
c3tc3tc3t
阅读(879)
推荐(0)
Ruby on Rails Mountable vs. Full Engine
摘要:原文 :https://www.travisluong.com/ruby-on-rails-mountable-vs-full-engine/一个Rails Engine 本质是一个 Rails application,你可以附加到其他的rails application上提供附加功能。一个Rail
阅读全文
posted @
2018-10-05 13:13
c3tc3tc3t
阅读(484)
推荐(0)
Debugging Ruby in VS Code
摘要:原文 https://dev.to/dnamsons/ruby-debugging-in-vscode-3bkj https://github.com/Microsoft/vscode-recipes/blob/2174a750102a76142378ea08dbbb4a576dc6d1d5/deb
阅读全文
posted @
2018-09-29 18:57
c3tc3tc3t
阅读(213)
推荐(0)
rspec 笔记
摘要:rspec的expect方法接收任何对象作为参数,并且返回一个rspec代理对象 叫做 ExpectationTarget。 ExpectationTarget存储了传递给expect方法的对象,他响应两个方法to和not_to (从技术上来说是三个, to_not是一个别名), to和not_to
阅读全文
posted @
2018-02-16 11:50
c3tc3tc3t
阅读(137)
推荐(0)
Modular Rails: The complete Guide to Modular Rails Applications 笔记
摘要:fix SamuraiCRM/engines/core/test/dummy/config/routes 修改如下 SamuraiCRM/engines/core/test/dummy/config/application.rb 修改如下 SamuraiCRM/engines/core/samura
阅读全文
posted @
2018-01-04 17:19
c3tc3tc3t
阅读(159)
推荐(0)
初始设置ubuntu 16.04 Vps部署rails
摘要:参考 https://blog.longwin.com.tw/2005/12/ssh_keygen_no_passwd/ 1 选择搬瓦工左边菜单栏中的“Root password modification”,然后“Generate and set new root password”,重置前请先把V
阅读全文
posted @
2017-10-16 01:13
c3tc3tc3t
阅读(251)
推荐(0)
部署herko小记
摘要:1 先执行如下 heroku run rake db:migrate
阅读全文
posted @
2017-09-22 13:08
c3tc3tc3t
阅读(201)
推荐(0)
ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash
摘要:rails 开发中 5.1版本使用binding.pry会报 ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash可以在下面文件中设置applicaiton.rbif Rail
阅读全文
posted @
2017-09-13 16:52
c3tc3tc3t
阅读(866)
推荐(0)
ruby **option作为函数参数,map的key必须是符号
摘要:# NEW UNNAMED KEYWORD ARGUMENTSdef new_way(**options)return options[:foo]end# => :new_waynew_way(foo: "bar")# => "bar"new_way# => nil 这里传递给new_way方法的m
阅读全文
posted @
2017-08-27 11:03
c3tc3tc3t
阅读(622)
推荐(0)
Rails 中 mattr_accessor 一处文档错误
摘要:http://xiewenwei.github.io/blog/2015/01/11/mattr-accessor-in-ruby-on-rails-activesupport/
阅读全文
posted @
2017-07-18 15:23
c3tc3tc3t
阅读(320)
推荐(0)
《Crafting Rails 4 Applications》的笔记-第28页
摘要:进行邮件测试,你需要在dummy目录下的虚拟程序添加一个配置 In your config/enviroments/test.rb, by default you should have the line config.action_mailer.delivery_method = :test fr
阅读全文
posted @
2017-07-05 15:25
c3tc3tc3t
阅读(136)
推荐(0)
gemspec和Gemfile的不同角色作用
摘要:[原文] http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/ 我的翻译 https://github.com/unixc3t/mydoc/blob/master/blog/gemspec.
阅读全文
posted @
2017-06-29 09:40
c3tc3tc3t
阅读(762)
推荐(0)
Helper Devise: could not find the `Warden::Proxy` instance on request environment
摘要:在使用devise这个gem时,编写控制器层的单元测试,你需要在你的rspec帮助文件 rails_helper.rb里添加下面这一样
阅读全文
posted @
2017-04-06 15:34
c3tc3tc3t
阅读(436)
推荐(0)
ruby中的== eql?和equal?区别
摘要:原文 http://www.wellho.net/mouth/985_Equality-in-Ruby-eql-and-equal-.html Equality in Ruby - == eql? and equal? The == comparison checks whether two val
阅读全文
posted @
2017-03-17 12:24
c3tc3tc3t
阅读(879)
推荐(0)