gem

Anyone can think of any way to customize Email( Mailboxer gem's) template view on rails3?

南楼画角 提交于 2019-12-11 14:26:33
问题 I'm currently using gem called "Mailboxer" on rails3. Everytime, mailboxer delivers email, and it seems it's using the template shown below. Anyone knows how to customize this template? Even though you install mailboxer, views won't be produced so that you can't customize it! You have a new message: subject You have received a new message: Body 回答1: rails g mailboxer:views Will generate the view files you need so you can edit them. 来源: https://stackoverflow.com/questions/11303303/anyone-can

install curb gem on Ruby

前提是你 提交于 2019-12-11 14:10:20
问题 I'm getting this error when trying to install curb on my Mac: /usr/bin/gcc-4.2 -dynamic -bundle -o curb_core.bundle curb.o curb_easy.o curb_errors.o curb_multi.o curb_postfield.o curb_upload.o -L. -L/Users/user/.rvm/rubies/ruby-1.9.2-p318/lib -L/Users/user/.rvm/usr/lib -L. -L/usr/local/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpthread -ldl -lobjc -lcurl ld: in /usr/local/lib/libssl.0.9.8.dylib, missing required architecture x86_64 in

Link ruby to RVM

戏子无情 提交于 2019-12-11 13:34:17
问题 I tried looking for an answer for about an hour but no luck. I have installed ruby-2.0.0 with my rvm but the system only detects the old ruby-1.9.3 !I changed the sym link in /usr/bin/ruby to point to my ~/.rvm ruby and now I get the following when I run ruby -v ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux] However when I try to start a rails server I get the error which says my current ruby version is 1.9.3 I ran gem env and got a surprising results: RubyGems Environment: -

Could not find gem 'rails x86-mingw32'

不问归期 提交于 2019-12-11 13:11:24
问题 I'm doing the Rails Tutorial by Michael Hartl and I ran into this problem when trying to run the rails server. This is is my gem file gem 'rails', '4.1.5' gem 'sqlite3' gem 'sass-rails', '~> 4.0.3' gem 'uglifier', '>= 1.3.0 gem 'coffee-rails', '~> 4.0.0' gem 'jquery-rails' gem 'turbolinks' gem 'jbuilder', '~> 2.0' gem 'sdoc', '~> 0.4.0', gem 'tzinfo-data', platforms: [:mingw, :mswin] 回答1: try gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw] 来源: https://stackoverflow.com/questions

why bash -l -c “CMD” makes ruby find my gem?

夙愿已清 提交于 2019-12-11 12:53:10
问题 In my ruby script,I required the gmail gem: require 'rubygems' require 'gmail' when running in shell,it works ok: ruby my-script.rb while when I put it in a cron job,it failed to execuate: * * * * * cd /to/script/directory;/usr/local/rvm/rubies/ree-1.8.7-2011.03/bin/ruby ./my-script.rb the log shows that the gmail gem can not be loaded: /usr/local/rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- gmail

Gem update fails, no Xcode

心不动则不痛 提交于 2019-12-11 12:30:56
问题 I ran sudo gem update earlier today and was thrilled to see it work, but at the end it failed. Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb update can't find header files for ruby. I don't have Xcode, and if possible, I don't want to install it. Any other way to fix this? 回答1: You will need to install xcode to get the c libraries that are required to

How to resolve bundle install rake error and Gem::RemoteFetcher::FetchError

自古美人都是妖i 提交于 2019-12-11 12:23:19
问题 When I run bundle install on ruby 2.1.2 I get: Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/rake-10.4.2.gem) An error occurred while installing rake (10.4.2), and Bundler cannot continue. Make sure that `gem install rake -v '10.4.2'` succeeds before bundling. When I run gem install rake I get: ERROR: Could not find a valid gem 'bundle' (>= 0), here is why: Unable to download data from

Uninitialized initializer constant

穿精又带淫゛_ 提交于 2019-12-11 12:08:09
问题 I created a settings.rb file under the initializers folder containing values I need initialized once the application starts. However, on running rails s I get a "Uninitialized contant Settings(NameError) Settings.rb Settings.defaults[:single_phase] = 500 Settings.defaults[:three_phase] = 300 I created the migration to accompany it already and the view. Where is the problem? 回答1: In your config/application_settings.rb development: single_phase: 200 and use it anywhere in your app APP_SETTINGS[

awesome_nested_fields gem nested form not showing

断了今生、忘了曾经 提交于 2019-12-11 12:07:21
问题 I have been having trouble with nested forms -- so I attempted to use the following gem: https://github.com/lailsonbm/awesome_nested_fields. Unfortunately the nested form (attitude) is not showing up in the task form -- I tried to follow the instructions exactly -- and I am hoping it is something dumb. I do not get any errors when the form is loaded. task model class Task < ActiveRecord::Base has_many :attitudes accepts_nested_attributes_for :attitudes, allow_destroy: true attr_accessible