https://aws.amazon.com/amazon-linux-ami/2012.03-release-notes/
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)
[ec2-user@ip-10-136-14-68 ~]$ vi ~/.bash_profile
[ec2-user@ip-10-136-14-68 ~]$
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export LC_CTYPE="en_US.UTF-8"
Run Code Online (Sandbox Code Playgroud)
你怎么解决这个?
我的代码出了什么问题?它说当我试图进行测试时,我的"它"没有定义
shaunstanislaus @ Master~/workspace/sinatra_practice/crud(master)$ rspec app_test.rb /Users/shaunstanislaus/workspace/sinatra_practice/crud/app_test.rb:1:in'for
<top (required)>': undefined methodmain:Object(NoMethodError)来自/ Users/shaunstanislaus /.rvm/gems/ruby-2.1.2/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105load' from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in:来自/Users/shaunstanislaus/.rvm/gems/的load_spec_files中的块ruby-2.1.2/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:ineach' from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:inload_spec_files'from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/gems/ rspec-core-3.1.7/lib/rspec/core/runner.rb:96:insetup' from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:84:inrun'from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.1.7/ lib/rspec/core/runner.rb:69:在run' from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:37:in调用'from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.1.7/exe/rspec:4:in<top (required)>' from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/bin/rspec:23:inload 'from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/bin/rspec:23:in<main>' from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:ineval'from /Users/shaunstanislaus/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:在''
it "creates a new bookmark" do
get "/bookmarks"
bookmarks = JSON.parse
(last_response.body)
last_size = bookmarks.size
post "/bookmarks",
{:url => "http://www.test.com", :title => "Test"}
last_response.status.should == 201
last_response.body.should match(/\/bookmarks\/\d+/)
get "/bookmarks"
bookmarks = JSON.parse …Run Code Online (Sandbox Code Playgroud) shaunstanislaus@Master ~/workspace/mongodb_rails_project/sodibee (master) $ rails g mongoid:config
Could not find generator 'mongoid:config'. Maybe you meant 'migration' or 'controller' or 'generator'
Run `rails generate --help` for more options
Run Code Online (Sandbox Code Playgroud)