无法安装Bundler

时间:2017-01-12 04:04:12

标签: ruby-on-rails macos openssl rubygems

请不要将此标记为重复,而不告诉我您认为哪个问题有帮助!

我的系统发生了一些与OpenSSL混淆的事情,导致它无法再与任何宝石连接。

目前的问题是// this is my adapter class public class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> { private Context context; private LayoutInflater layoutInflater; private ArrayList<Bills_model> checkboxClassArrayList; private ArrayList<Bills_model>checkedItemList; private OnRecyclerViewItemClickListener onRecyclerViewItemClickListener; public MyAdapter(Context context,ArrayList<Bills_model> checkboxClassArrayList,ArrayList<Bills_model>chedItemList){ this.context=context; this.checkboxClassArrayList=checkboxClassArrayList; this.checkedItemList=chedItemList; layoutInflater = LayoutInflater.from(context); } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { final View view = layoutInflater.inflate(R.layout.singlerow_full_partial_paymentselection,parent,false); return new ViewHolder(view); } @Override public void onBindViewHolder(ViewHolder holder, int position) { final Bills_model checkboxClass = checkboxClassArrayList.get(position); holder.checkBox.setChecked(checkboxClass.isChecked()); holder.amount.setText(String.valueOf(checkboxClass.getTotal_amnt_afterdiscount())); holder.checkBox.setTag(checkboxClass); } @Override public int getItemCount() { return checkboxClassArrayList.size(); } public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private RadioButton checkBox; private TextView amount; public ViewHolder(View itemView) { super(itemView); checkBox = (RadioButton)itemView.findViewById(R.id.rbt_partial); amount=(TextView) itemView.findViewById(R.id.amount_full_partial); checkBox.setOnClickListener(this); amount.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()){ case R.id.rbt_partial: if(onRecyclerViewItemClickListener!=null) { final Bills_model tag = (Bills_model) v.getTag(); tag.setChecked(true); onRecyclerViewItemClickListener.onItemClick(getAdapterPosition(),v); } break; } } } public void setOnRecyclerViewItemClickListener(OnRecyclerViewItemClickListener onRecyclerViewItemClickListener){ this.onRecyclerViewItemClickListener=onRecyclerViewItemClickListener; }} // this is my on click listener @Override public void onItemClick(int position, View view) { final Bills_model checkboxClass; switch (view.getId()) { case R.id.rbt_partial: checkboxClass = (Bills_model) view.getTag(); /**/ if(checkboxClass.isChecked()) { Log.e("SDsd","Ddaerwerwerewrfgsd"); for(int i=0; i<bills_modelArrayList.size(); i++) { final Bills_model data = bills_modelArrayList.get(i); if(data.equals(checkboxClass)) { Log.e("SDsd","data_if"+data.getTotal_amnt_afterdiscount()); data.setChecked(true); } else { Log.e("SDsd","data_else"+data.getTotal_amnt_afterdiscount()); data.setChecked(false); } } } else { Log.e("SDsd","data_else"+"elseeeeeee>?????"); } /**/ final Dialog dialog = new Dialog(Select_Full_Partial_Activity.this); dialog.setContentView(R.layout.enteramount_partial); dialog.setTitle("Title..."); // set the custom dialog components - text, image and button final EditText text = (EditText) dialog.findViewById(R.id.txtamount_advanceamnt); TextView ok = (TextView) dialog.findViewById(R.id.txtok_advanceamnt); // if button is clicked, close the custom dialog ok.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); double amountToDeduct= Integer.parseInt(text.getText().toString()); double amountenterd= Double.parseDouble(checkboxClass.getTotal_amnt_afterdiscount()); if(amountToDeduct>amountenterd) { Toast.makeText(Select_Full_Partial_Activity.this,"You are enterting amount greater than" +String.valueOf(checkboxClass.getTotal_amnt_afterdiscount()),Toast.LENGTH_SHORT).show(); } else { checkboxClass.setTotal_amnt_afterdiscount(""+amountToDeduct); } myAdapter.notifyDataSetChanged(); } }); myAdapter.notifyDataSetChanged(); dialog.show(); break; case R.id.cb_full: break; } } 给了我以下错误:

错误:找不到有效的gem&#39; bundler&#39; (&gt; = 0),原因如下:           无法从https://rubygems.org/下载数据 - SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书验证失败(https://api.rubygems.org/specs.4.8.gz

这是gem install bundler

的结果
openssl version -a

这是OpenSSL 1.0.2h 3 May 2016 built on: reproducible build, date unspecified platform: darwin64-x86_64-cc options: bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx) compiler: cc -I. -I.. -I../include -fPIC -fno-common -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM OPENSSLDIR: "/usr/local/openssl-1.0.2h/ssl"

的结果

的/ usr / local / bin中/ OpenSSL的

另外,检查rvm ssl的东西:

which openssl

我已经在stackoverflow,github,我能想到的任何地方检查了一切,并且没有一个解决方案有效。请帮忙!

1 个答案:

答案 0 :(得分:0)

所以,我不确定这是否是一个好的答案,但它是唯一真正结束工作的东西。

首先,我将Mac OSX升级到Sierra。它回到了优胜美地。我不得不这样做,因为我的下一步是下载最新版本的XCode(由于Yosemite我被困在版本7上)。

然后,我手动卸载了每一个:

openssl:brew uninstall openssl

RVM:rvm remove

自制语:https://github.com/Homebrew/install

最后,我一个接一个地重新安装它们,重新安装了所有我的红宝石,最终工作了。巨大的麻烦,很多时间的流逝,以及对我不太关心的事情感到太多的沮丧。这些天成为开发者的耻辱。 :(