দেখে মনে হচ্ছে যে সিস্টেমটি ইনস্টল করা রুবি উপাদানগুলি সন্ধান করার জন্য প্রয়োজনীয় পরিবেশটিকে কোনও ফাইলে নির্দিষ্ট করা হয়েছে যা কেবল লগইন শেলগুলির জন্য পড়তে পারে। লগইন শেল এবং লগ-ইন না করা শেলগুলির মধ্যে পার্থক্য সম্পর্কে বাশ ম্যানুয়াল পৃষ্ঠাটিতে এটি বলা আছে:
INVOCATION
A login shell is one whose first character of argument zero is a -, or
one started with the --login option.
এবং
When bash is invoked as an interactive login shell, or as a non-inter‐
active shell with the --login option, it first reads and executes com‐
mands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in that order, and reads and executes commands from the first one that
exists and is readable.
যেহেতু
When an interactive shell that is not a login shell is started, bash
reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if
these files exist.
সুতরাং রুবি পরিবেশের ভেরিয়েবলগুলি /home/rails/.profileবা /etc/profileউদাহরণস্বরূপ থাকলে সেগুলি শেল পরিবেশে যুক্ত হবে
- স্পষ্টভাবে
su -l railsবা লগইন শেল ব্যবহার করে বা su --login railsশর্টহ্যান্ড ব্যবহার করেsu - rails
- যখন ব্যবহারকারী
railsএসএসএইচ এর মাধ্যমে লগ ইন করে
bash --loginলগইন করার পরে একটি সাব-শেল শুরু করে
আপনি যদি ব্যবহারকারীটিতে স্যুইচ করেন তা নির্বিশেষে রুবি পরিবেশ নির্ধারণ করতে চান তবে আপনি railsপ্রাসঙ্গিক পরিবর্তনশীল সংজ্ঞাটি ব্যবহারকারীর ~/.bashrcপরিবর্তে সরিয়ে নিতে পারেন।
su? বা এর মতোsu -lবা কিছুsu --?) এ স্যুইচ করছেন ? "রেল" ব্যবহারকারীর জন্য লগইন শেল কী? আপনি যদি ব্যবহারকারীর পথ পরিবর্তনশীল পরিবর্তন হয়নি এবং যদি তাই হয় যা ফাইলে (~/.profileবা~/.bashrcবা~/.bash_profileবা ...?)